/* Web Monitor specific styles */

.device-card.has-changes {
  border-left: 3px solid #d29922;
}

.device-card.no-changes {
  border-left: 3px solid #3fb950;
}

.device-card.scan-error {
  border-left: 3px solid #f85149;
}

.device-card.no-baseline {
  border-left: 3px solid #484f58;
}

.comp-url {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  color: #58a6ff;
  word-break: break-all;
  text-decoration: none;
}

.comp-url:hover {
  text-decoration: underline;
}

.comp-meta {
  font-size: 12px;
  color: #8b949e;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.comp-meta .label {
  color: #484f58;
}

.baseline-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.baseline-badge.captured {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
}

.baseline-badge.missing {
  background: rgba(139, 148, 158, 0.15);
  color: #8b949e;
}

.change-count-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.change-count-badge.has-changes {
  background: rgba(210, 153, 34, 0.15);
  color: #d29922;
}

.change-count-badge.clean {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
}

.change-count-badge.error {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #30363d;
  border-radius: 20px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background: #c9d1d9;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #238636;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.change-feed {
  padding: 0 24px 24px;
}

.change-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid #21262d;
  margin-bottom: 12px;
}

.change-feed-filters {
  display: flex;
  gap: 8px;
}

.change-feed-header h2 {
  font-size: 16px;
  color: #f0f6fc;
  margin: 0;
}

.change-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.change-card.collapsed {
  padding: 0;
}

.change-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  cursor: pointer;
  user-select: none;
}

.change-card.collapsed .change-card-header {
  margin-bottom: 0;
  padding: 10px 16px;
}

.change-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.change-card-chevron {
  font-size: 10px;
  color: #484f58;
  width: 12px;
  flex-shrink: 0;
}

.change-card-count {
  font-size: 11px;
  font-weight: 600;
  background: rgba(210, 153, 34, 0.15);
  color: #d29922;
  padding: 1px 7px;
  border-radius: 10px;
}

.change-card-title {
  font-weight: 600;
  font-size: 14px;
  color: #f0f6fc;
}

.change-card-time {
  font-size: 12px;
  color: #484f58;
}

.change-card-error {
  color: #f85149;
  font-size: 13px;
  padding: 6px 10px;
  background: rgba(248, 81, 73, 0.1);
  border-radius: 6px;
}

.change-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.change-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #0d1117;
}

.change-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.change-type.added {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
}

.change-type.removed {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
}

.change-type.changed {
  background: rgba(210, 153, 34, 0.15);
  color: #d29922;
}

.change-date {
  font-size: 11px;
  color: #484f58;
}

.new-badge {
  font-size: 10px;
  font-weight: 700;
  color: #f0883e;
  background: rgba(240, 136, 62, 0.15);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  white-space: nowrap;
}

.change-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.change-section {
  font-size: 11px;
  color: #484f58;
  font-weight: 600;
  text-transform: uppercase;
}

.diff-old {
  color: #f85149;
  word-break: break-word;
}

.diff-new {
  color: #3fb950;
  word-break: break-word;
}

.no-changes-msg {
  text-align: center;
  padding: 20px;
  color: #484f58;
  font-size: 13px;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.settings-row label {
  margin-bottom: 0 !important;
  flex: 1;
}

.cron-hint {
  font-size: 11px;
  color: #484f58;
  margin-top: 4px;
}

.cron-examples {
  font-size: 12px;
  color: #8b949e;
  margin-top: 8px;
  line-height: 1.8;
}

.cron-examples code {
  background: #0d1117;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #30363d;
  border-top-color: #58a6ff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.device-card.scanning {
  opacity: 0.7;
  pointer-events: none;
}

.change-item-image {
  flex-wrap: wrap;
}

.diff-image-row {
  display: flex;
  align-items: center;
  gap: 8px;
  word-break: break-word;
}

.diff-thumbnail {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #30363d;
  background: #0d1117;
  flex-shrink: 0;
}

.diff-link {
  color: #58a6ff;
  text-decoration: none;
  word-break: break-all;
}

.diff-link:hover {
  text-decoration: underline;
}

.diff-link-old {
  color: #f85149;
}

.diff-link-new {
  color: #3fb950;
}

.diff-link.visited {
  color: #2a6f2b;
}

.diff-link-old.visited {
  color: #8b3a35;
}
