/* ═══════════════════════════════════════════
   YOUTUBE LOCAL SEO MODULE CSS
   ═══════════════════════════════════════════ */

.yt-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
}

/* KPI Channel Overview Row */
.yt-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}

@media (max-width: 1024px) {
  .yt-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .yt-kpi-row {
    grid-template-columns: 1fr;
  }
}

.yt-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yt-kpi-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.yt-kpi-value-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.yt-kpi-value {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: 1.1;
}

.yt-kpi-growth {
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.yt-kpi-growth.up {
  color: #10b981;
}

.yt-kpi-growth.down {
  color: #ef4444;
}

.yt-kpi-subtext {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* 2-Column Main Workspace Grid */
.yt-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-5);
}

@media (max-width: 1024px) {
  .yt-main-grid {
    grid-template-columns: 1fr;
  }
}

.yt-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Tabs Header */
.yt-tabs-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 12px;
}

.yt-tabs {
  display: flex;
  gap: 16px;
}

.yt-tab {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding-bottom: 12px;
  position: relative;
  transition: color 0.15s ease;
}

.yt-tab:hover {
  color: var(--text-secondary);
}

.yt-tab.active {
  color: var(--text-primary);
}

.yt-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #6366f1;
}

/* Charts Simulated graphics */
.yt-chart-container {
  height: 220px;
  width: 100%;
  position: relative;
}

.yt-chart-axis-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* SEO Radial progress indicators */
.yt-radial-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: var(--space-3) 0;
}

.yt-radial-svg {
  transform: rotate(-90deg);
  width: 120px;
  height: 120px;
}

.yt-radial-bg {
  fill: none;
  stroke: rgba(255,255,255,0.04);
  stroke-width: 10px;
}

.yt-radial-progress {
  fill: none;
  stroke: #6366f1;
  stroke-width: 10px;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.yt-radial-text-wrap {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
}

.yt-radial-score {
  font-size: 1.75rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: 1;
}

.yt-radial-max {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.yt-radial-lbl {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: #10b981; /* Green "Great" text */
  margin-top: 4px;
}

/* Progress List Rows */
.yt-progress-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.yt-progress-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yt-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
}

.yt-progress-name {
  color: var(--text-secondary);
}

.yt-progress-value {
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.yt-progress-track {
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.yt-progress-fill {
  height: 100%;
  background: #6366f1;
  border-radius: 2px;
  transition: width 0.6s ease-in-out;
}

/* Table layouts */
.yt-video-thumb {
  width: 52px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-elevated);
}

.yt-score-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: var(--fw-bold);
  display: inline-block;
}

.yt-score-badge.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.25);
}

/* Checklist Status Tags */
.yt-status-tag {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: capitalize;
}

.yt-status-tag.completed {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.yt-status-tag.inprogress {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.yt-status-tag.pending {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* 3-Column Opportunities Row Grid */
.yt-opp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

@media (max-width: 1024px) {
  .yt-opp-grid {
    grid-template-columns: 1fr;
  }
}

/* Suggestions actions list */
.yt-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yt-suggest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  gap: 12px;
}

.yt-suggest-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.yt-suggest-text {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-primary);
}

.yt-suggest-subtext {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Bottom Grid layout */
.yt-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

@media (max-width: 768px) {
  .yt-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* Tools items chips */
.yt-tool-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 480px) {
  .yt-tool-list {
    grid-template-columns: 1fr;
  }
}

.yt-tool-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.yt-tool-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-color-hover);
}

.yt-tool-title {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-secondary);
}

.yt-tool-link-action {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.yt-tool-item:hover .yt-tool-link-action {
  color: #6366f1;
}

/* Auditor Search Bar Card */
.yt-search-bar {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .yt-search-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Instruction Modal Overlay */
.yt-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.yt-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  width: 520px;
  max-width: 90%;
  box-shadow: var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  animation: modalEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.yt-modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.yt-modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

/* Loading overlay */
.yt-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(17, 17, 17, 0.85);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(2px);
}

.yt-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99, 102, 241, 0.1);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: yt-spin 1s linear infinite;
}

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

.yt-loading-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}

.yt-loading-step {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s ease;
}

.yt-loading-step.active {
  color: #6366f1;
}

.yt-loading-step.done {
  color: #10b981;
}
