/* ============ لوحة الطقس الرئيسية ============ */

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 40px) 60px;
}

/* -- شريط البحث -- */
.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.search-row form {
  display: flex;
  flex: 1;
  min-width: 240px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-panel);
}

.search-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 13px 16px;
  font-family: var(--font-arabic);
  font-size: 14px;
}
.search-row input:focus { outline: none; }
.search-row input::placeholder { color: var(--text-faint); }

.btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0 18px;
  cursor: pointer;
  font-family: var(--font-arabic);
  font-size: 14px;
  transition: color 0.15s ease, background 0.15s ease;
}
.btn:hover { color: var(--text-primary); background: var(--bg-panel-raised); }

.btn-brass {
  background: var(--brass);
  color: #10161d;
  font-weight: 700;
  padding: 0 20px;
}
.btn-brass:hover { background: var(--brass-bright); color: #10161d; }

.unit-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.unit-toggle button {
  background: var(--bg-panel);
  border: none;
  color: var(--text-faint);
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.unit-toggle button.active { background: var(--sky-dim); color: var(--text-primary); }

.locate-btn {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--text-muted);
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-arabic);
  font-size: 14px;
}
.locate-btn:hover { color: var(--brass-bright); border-color: var(--brass); }

/* -- حالات التحميل / الخطأ -- */
.status-banner {
  display: none;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
}
.status-banner.show { display: block; }
.status-banner.error { background: rgba(217, 99, 74, 0.12); color: var(--storm); border: 1px solid rgba(217, 99, 74, 0.3); }
.status-banner.loading { background: rgba(91, 143, 176, 0.1); color: var(--sky); border: 1px solid rgba(91, 143, 176, 0.25); }

/* -- اللوحة الرئيسية: الطقس الحالي -- */
.main-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 860px) {
  .main-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
}

.current-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.current-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.location-name {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0;
}
.location-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.condition-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass-bright);
  border: 1px solid var(--brass);
  border-radius: 999px;
  padding: 5px 14px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.condition-tag svg { flex-shrink: 0; }

.temp-display {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 28px 0 8px;
}

.hero-icon { flex-shrink: 0; }
.hero-icon svg { width: 84px; height: 84px; display: block; }
@media (max-width: 480px) {
  .hero-icon svg { width: 60px; height: 60px; }
}

.temp-number {
  font-family: var(--font-mono);
  font-size: clamp(64px, 9vw, 96px);
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -2px;
}
.temp-number span { font-size: 0.4em; color: var(--text-faint); vertical-align: top; }

.feels-like {
  color: var(--text-muted);
  font-size: 14px;
}
.feels-like strong { color: var(--text-primary); font-family: var(--font-mono); }

/* -- القرص الدائري (العنصر المميّز) -- */
.dial-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.dial-panel .dial-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-faint);
  text-transform: uppercase;
}
#windDial { width: 100%; max-width: 220px; height: auto; }
.dial-readout {
  display: flex;
  gap: 20px;
  text-align: center;
}
.dial-readout div span {
  display: block;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--brass-bright);
}
.dial-readout div small {
  font-size: 11px;
  color: var(--text-faint);
}

/* -- شبكة التفاصيل -- */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.detail-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.detail-card .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.detail-card .value {
  font-family: var(--font-mono);
  font-size: 26px;
  color: var(--text-primary);
}
.detail-card .value small { font-size: 13px; color: var(--text-faint); }
.detail-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* -- التوقعات -- */
.section-heading {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 36px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.forecast-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .forecast-strip { grid-template-columns: repeat(2, 1fr); }
}

.forecast-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
}
.forecast-card .fday {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass-bright);
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.forecast-card svg { width: 40px; height: 40px; margin: 4px auto; }
.forecast-card .frange {
  font-family: var(--font-mono);
  font-size: 15px;
  margin-top: 8px;
}
.forecast-card .frange .lo { color: var(--text-faint); }
.forecast-card .fdesc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  min-height: 28px;
}
.forecast-card .fpop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sky);
}

/* -- شريط الرطوبة/الوقت بالساعة -- */
.hourly-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.hourly-strip::-webkit-scrollbar { height: 6px; }
.hourly-strip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.hour-card {
  flex: 0 0 auto;
  min-width: 84px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
}
.hour-card .htime { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.hour-card svg { width: 28px; height: 28px; margin: 8px auto; }
.hour-card .htemp { font-family: var(--font-mono); font-size: 16px; }
.hour-card .hpop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sky);
}
.hour-card .hpop-empty { color: var(--text-faint); }

/* -- بطاقة الشمس -- */
.sun-panel {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
}
.sun-item { text-align: center; }
.sun-item svg { width: 32px; height: 32px; margin-bottom: 8px; color: var(--brass); }
.sun-item .stime { font-family: var(--font-mono); font-size: 18px; }
.sun-item .slabel { font-size: 11px; color: var(--text-faint); margin-top: 4px; }

/* -- محتوى تعليمي إضافي (لأدسنس) -- */
.info-section {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.info-section h2 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--brass-bright);
  margin-bottom: 12px;
}
.info-section p { color: var(--text-muted); max-width: 780px; }

.skeleton {
  animation: pulse 1.4s ease-in-out infinite;
  background: var(--bg-panel-raised);
  border-radius: 4px;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}
