/* ==========================================================================
   NewsDesk AI - Review, Editor & Map Component Stylesheet (style.css)
   ========================================================================== */

/* Review Layout & Header */
.review-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
}

.review-page-header {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.review-header-title {
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-back-btn {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.review-back-btn:hover {
  color: var(--text-main);
  transform: translateX(-2px);
}

.review-subtitle {
  margin-left: 36px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.review-header-actions {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin: 0;
}

/* Alert Notification Messages */
.review-messages {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

.review-alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.review-alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.review-alert-info {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* 3-Column Review Grid */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 24px;
  flex: 1;
  overflow: hidden;
}

.review-col {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.review-col-left {
  gap: 20px;
}

/* Column 1: Submission Media & Metadata */
.panel-heading {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.submission-thumb {
  width: 100%;
  height: 200px;
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.submission-thumb-empty {
  width: 100%;
  height: 200px;
  background: var(--surface-hover);
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-item-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.meta-item-value {
  font-weight: 500;
}

.meta-box {
  background: var(--surface-hover);
  padding: 16px;
  border-radius: 8px;
}

.meta-box-header {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 0.85rem;
}

.meta-sublabel {
  color: var(--text-muted);
}

/* Google Maps Integration */
.map-card {
  margin-top: 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  background: var(--background);
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(15, 17, 26, 0.9);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.map-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  font-weight: 500;
}

.map-external-link {
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  transition: color 0.2s;
}

.map-external-link:hover {
  text-decoration: underline;
}

.map-iframe-container {
  width: 100%;
  height: 160px;
  position: relative;
}

.map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-coords-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(15, 17, 26, 0.85);
  backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

/* Column 2: AI Verification Scores */
.ai-section-title {
  font-size: 1.1rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-scores-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.score-row-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.score-row-value {
  font-weight: 600;
  color: black;
}

.score-progress-track {
  height: 6px;
  background: var(--surface-hover);
  border-radius: 3px;
  overflow: hidden;
}

.score-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.score-high {
  background: var(--success);
  padding: 2px;
  border-radius: 4px;
}

.score-medium {
  background: var(--warning);
  color: black;
  padding: 2px;
  border-radius: 4px;
}

.score-low {
  background: var(--danger);
  color: black;
  padding: 2px;
  border-radius: 4px;
}

.ai-flag-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.ai-flag-title {
  color: var(--warning);
  font-size: 0.9rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-flag-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ai-block-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.ai-block-title {
  color: var(--danger);
  font-size: 0.9rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sources-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-badge-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--surface-hover);
  border-radius: 6px;
  font-size: 0.85rem;
  transition: background 0.2s ease;
}

.source-badge-link:hover {
  background: rgba(99, 102, 241, 0.15);
}

.source-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.source-status-dot.success { background: var(--success); }
.source-status-dot.danger { background: var(--danger); }

/* Column 3: Article Editor & Form */
.editor-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.editor-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-heading {
  font-size: 1.15rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.editor-save-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Audit Card */
.audit-card {
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.audit-card-edited {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.audit-card-draft {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.audit-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-editor-name {
  color: var(--text-main);
  font-weight: 600;
}

.audit-time {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

/* Form Controls */
.field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.editor-headline-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-main);
  transition: border-color 0.2s;
}

.editor-headline-input:focus {
  border-color: var(--primary);
  outline: none;
}

.editor-summary-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-main);
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s;
}

.editor-summary-textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.editor-body-textarea {
  width: 100%;
  flex: 1;
  min-height: 220px;
  padding: 14px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: var(--font-main);
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s;
}

.editor-body-textarea:focus {
  border-color: var(--primary);
  outline: none;
}

/* Tags Section */
.tags-panel {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.tags-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tags-count-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tags-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag-pill {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.tag-pill:hover {
  background: rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.tag-hash {
  opacity: 0.6;
}

.tags-text-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(15, 17, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.85rem;
  transition: border-color 0.2s;
}

.tags-text-input:focus {
  border-color: var(--primary);
  outline: none;
}

.tags-help-text {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.editor-footer-btn {
  justify-content: center;
  width: 100%;
  padding: 12px;
}

/* Empty State */
.empty-state-panel {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

.empty-state-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.empty-state-title {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--text-main);
}

.empty-state-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
}

/* ==========================================================================
   Dashboard Articles & Toggle Switch Component
   ========================================================================== */

.articles-section {
  margin-top: 32px;
  padding: 24px;
}

.articles-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.articles-section-title {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.filter-tabs {
  display: inline-flex;
  gap: 8px;
  background: var(--surface-hover);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.filter-tab {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
  text-decoration: none;
}

.filter-tab:hover {
  color: var(--text-main);
}

.filter-tab.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Toggle Switch Component */
.toggle-switch-form {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  flex-shrink: 0;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #94a3b8;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
  background-color: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(20px);
  background-color: #ffffff;
}

.toggle-switch:hover .toggle-slider {
  border-color: rgba(255, 255, 255, 0.25);
}

.toggle-label {
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 82px;
  transition: color 0.2s ease;
}

.toggle-label.published {
  color: var(--success);
}

.toggle-label.unpublished {
  color: var(--text-muted);
}

/* Toast Notification for Dashboard */
.dash-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(26, 29, 45, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  color: var(--text-main);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.dash-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
