/* ════════════════════════════════════════════════════════════
   Smart Top Center Card Styles
   بطاقة أعلى مركز الذكية
   ════════════════════════════════════════════════════════════ */

.smart-top-center-card {
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--rl);
  overflow: hidden;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 0;
  flex-shrink: 0;
}

.smart-top-center-card.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  max-height: 500px;
}

/* ── CONTAINER ──────────────────────────────────────────────── */
.stc-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── HEADER ────────────────────────────────────────────────── */
.stc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-bottom: 2px solid #e69100;
}

.stc-icon {
  font-size: 24px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.stc-title {
  flex: 1;
}

.stc-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.stc-title p {
  margin: 2px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* ── CONTENT ────────────────────────────────────────────────── */
.stc-content {
  padding: 14px 16px;
}

.stc-center-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--t1);
  margin-bottom: 8px;
  line-height: 1.3;
}

.stc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(45, 139, 64, 0.1);
  color: var(--g5);
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ── STATISTICS ─────────────────────────────────────────────── */
.stc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stc-stat {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stc-stat-label {
  font-size: 10px;
  color: var(--t2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stc-stat-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--g5);
}

.stc-stat-unit {
  font-size: 9px;
  color: var(--t3);
  font-weight: 500;
}

/* ── NOTE ───────────────────────────────────────────────────── */
.stc-note {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  background: rgba(45, 139, 64, 0.05);
  border-right: 3px solid var(--g4);
  border-radius: 4px;
  font-size: 11px;
  color: var(--g5);
  font-weight: 600;
  margin-bottom: 12px;
}

.stc-note i {
  font-size: 12px;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.stc-footer {
  padding: 0 16px 14px;
  display: flex;
  gap: 8px;
}

.stc-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--bd);
  border-radius: 6px;
  background: var(--sf);
  color: var(--t2);
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stc-btn:hover {
  border-color: var(--g4);
  color: var(--g4);
  background: var(--g0);
}

.stc-btn-clear {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(220, 38, 38, 0.2);
  color: #dc2626;
}

.stc-btn-clear:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

/* ── DARK MODE ──────────────────────────────────────────────── */
body.dark-style .smart-top-center-card {
  background: #111417;
  border-color: #222830;
}

body.dark-style .stc-stat {
  background: #161a1e;
  border-color: #2d3640;
}

body.dark-style .stc-note {
  background: rgba(45, 139, 64, 0.1);
  color: var(--g2);
}

body.dark-style .stc-btn {
  background: #161a1e;
  border-color: #2c3541;
  color: #a1a1aa;
}

body.dark-style .stc-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--g4);
  color: var(--g3);
}

body.dark-style .stc-btn-clear {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
  color: #f87171;
}

body.dark-style .stc-btn-clear:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .stc-header {
    padding: 12px 14px;
  }

  .stc-icon {
    font-size: 20px;
  }

  .stc-title h3 {
    font-size: 13px;
  }

  .stc-title p {
    font-size: 10px;
  }

  .stc-center-name {
    font-size: 14px;
  }

  .stc-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stc-stat {
    padding: 8px;
  }

  .stc-stat-value {
    font-size: 14px;
  }

  .stc-btn {
    font-size: 11px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .stc-container {
    border-radius: var(--r);
  }

  .stc-header {
    padding: 10px 12px;
    gap: 10px;
  }

  .stc-icon {
    font-size: 18px;
  }

  .stc-title h3 {
    font-size: 12px;
  }

  .stc-center-name {
    font-size: 13px;
  }

  .stc-stats {
    grid-template-columns: 1fr;
  }

  .stc-content,
  .stc-footer {
    padding-right: 12px;
    padding-left: 12px;
  }
}

/* ── GLASS MODE ─────────────────────────────────────────────── */
body.glass-style .smart-top-center-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

body.dark-style.glass-style .smart-top-center-card {
  background: rgba(22, 26, 30, 0.65);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
