/* static/css/mirror.css — Mirror-mode UI styles */

/* ─── Amber Banner ─────────────────────────────────────────────────────── */

.mirror-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1a1a;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  animation: mirrorBannerSlideIn 0.3s ease-out;
}

.mirror-banner.mirror-banner-dismissed {
  display: none;
}

.mirror-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  max-width: 100%;
}

.mirror-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.mirror-banner-text {
  flex: 1;
  line-height: 1.4;
}

.mirror-banner-text strong {
  font-weight: 600;
}

.mirror-banner-action {
  flex-shrink: 0;
  padding: 5px 14px;
  background: rgba(0, 0, 0, 0.15);
  color: #1a1a1a;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.mirror-banner-action:hover {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(0, 0, 0, 0.35);
}

.mirror-banner-action:active {
  background: rgba(0, 0, 0, 0.35);
}

.mirror-banner-dismiss {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: rgba(0, 0, 0, 0.5);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}

.mirror-banner-dismiss:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1a1a1a;
}

@keyframes mirrorBannerSlideIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ─── Disabled Write Actions ───────────────────────────────────────────── */

.mirror-mode-active .mirror-disabled,
.mirror-mode-active [data-mirror-disabled="true"] {
  opacity: 0.45 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  position: relative;
}

.mirror-mode-active .mirror-disabled::after {
  content: "Unavailable in mirror mode";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #f59e0b;
  white-space: nowrap;
  pointer-events: none;
  display: none;
}

.mirror-mode-active .mirror-disabled:hover::after {
  display: block;
}

/* ─── Search Results Indicator ─────────────────────────────────────────── */

.mirror-mode-active .search-results-header::before {
  content: "🔍 Searching local mirror";
  display: block;
  font-size: 11px;
  color: #f59e0b;
  margin-bottom: 4px;
  font-style: italic;
}

/* ─── Message List Indicator ───────────────────────────────────────────── */

.mirror-mode-active .message-list-container::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f59e0b, transparent);
}

/* ─── Dark Theme Adjustments ───────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  .mirror-banner {
    background: linear-gradient(135deg, #b45309, #92400e);
    color: #fef3c7;
  }

  .mirror-banner-action {
    background: rgba(255, 255, 255, 0.1);
    color: #fef3c7;
    border-color: rgba(255, 255, 255, 0.2);
  }

  .mirror-banner-action:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .mirror-banner-dismiss {
    color: rgba(255, 255, 255, 0.5);
  }

  .mirror-banner-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fef3c7;
  }
}
