/* آب‌وهوا + تقویم — تم سفید ساده */
html.hpb-wx-html,
body.hpb-wx-standalone,
.hpb-wx-page {
  font-family: var(--hpb-font-primary, yekan, Tahoma, Arial, sans-serif);
}
html.hpb-wx-html,
body.hpb-wx-standalone {
  margin: 0;
  height: 100%;
  background: #f5f7fa;
}
body.hpb-wx-standalone #wpadminbar { display: none !important; }
body.hpb-wx-standalone {
  padding: 0 !important;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
}
body.hpb-wx-standalone #hpb-site-header,
body.hpb-wx-standalone #hpb-site-footer,
body.hpb-wx-standalone #hpb-floating-nav,
body.hpb-wx-standalone .hpb-floating-nav,
body.hpb-wx-standalone .hpb-sticky-bottom-nav-shell,
body.hpb-wx-standalone .mobile-bottom-nav-shell,
body.hpb-wx-standalone .elementor-location-header,
body.hpb-wx-standalone .elementor-location-footer {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.hpb-wx-page {
  --wx-bg: #f5f7fa;
  --wx-surface: #ffffff;
  --wx-surface2: #f3f4f6;
  --wx-border: #e5e7eb;
  --wx-text: #111827;
  --wx-muted: #6b7280;
  --wx-accent: #2563eb;
  --wx-accent-soft: #dbeafe;
  --wx-warn: #d97706;
  --wx-danger: #dc2626;
  --wx-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --wx-radius: 16px;
  height: 100dvh;
  box-sizing: border-box;
  color: var(--wx-text);
  background: var(--wx-bg);
}
.hpb-wx-page[data-theme="night"] {
  --wx-bg: #0f172a;
  --wx-surface: #1e293b;
  --wx-surface2: #334155;
  --wx-border: #334155;
  --wx-text: #f1f5f9;
  --wx-muted: #94a3b8;
  --wx-accent: #38bdf8;
  --wx-accent-soft: #0c4a6e;
  --wx-warn: #fbbf24;
  --wx-danger: #f87171;
  --wx-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.hpb-wx-page__shell {
  width: min(1480px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: .65rem .9rem .75rem;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: .55rem;
  min-height: 0;
}

.hpb-wx-page__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .75rem;
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: 14px;
  box-shadow: var(--wx-shadow);
  min-height: 0;
}
.hpb-wx-page__brand { min-width: 0; flex: 1 1 auto; }
.hpb-wx-page__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}
.hpb-wx-page__date {
  margin: .12rem 0 0;
  color: var(--wx-muted);
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hpb-wx-page__tools {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: 0 0 auto;
}
.hpb-wx-page__search {
  display: flex;
  gap: .3rem;
  align-items: center;
}
.hpb-wx-page__input {
  width: min(180px, 28vw);
  min-height: 34px;
  border: 1px solid var(--wx-border);
  border-radius: 10px;
  padding: .3rem .65rem;
  background: var(--wx-surface2);
  color: var(--wx-text);
  font-size: .85rem;
}
.hpb-wx-page__btn {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  padding: .3rem .75rem;
  background: var(--wx-accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: .82rem;
  white-space: nowrap;
}
.hpb-wx-page__btn--ghost {
  background: var(--wx-surface);
  color: var(--wx-text);
  border: 1px solid var(--wx-border);
}
.hpb-wx-theme {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--wx-border);
  background: var(--wx-surface);
  color: var(--wx-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.hpb-wx-page[data-theme="day"] .hpb-wx-theme__night { display: none; }
.hpb-wx-page[data-theme="night"] .hpb-wx-theme__day { display: none; }

.hpb-wx-page__status {
  padding: .45rem .7rem;
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: 10px;
  color: var(--wx-muted);
  font-size: .85rem;
}
.hpb-wx-page__error {
  padding: .8rem;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 12px;
}

.hpb-wx-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, .82fr);
  gap: .65rem;
  min-height: 0;
  height: 100%;
  align-items: stretch;
  overflow: hidden;
}
.hpb-wx-page__main,
.hpb-wx-page__body {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.hpb-wx-now {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, .75fr);
  gap: 1rem 1.25rem;
  align-content: center;
  align-items: center;
  padding: 1.25rem 1.35rem;
  min-height: 0;
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  box-shadow: var(--wx-shadow);
}
.hpb-wx-now__city {
  font-size: .9rem;
  font-weight: 700;
  color: var(--wx-muted);
  margin-bottom: .55rem;
}
.hpb-wx-now__row {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
}
.hpb-wx-now__icon {
  font-size: 3.1rem;
  color: var(--wx-warn);
  line-height: 1;
}
.hpb-wx-now__temp {
  font-size: 4rem;
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.05em;
  color: var(--wx-text);
}
.hpb-wx-now__cond {
  color: var(--wx-muted);
  font-size: 1.05rem;
  font-weight: 600;
  align-self: flex-end;
  padding-bottom: .45rem;
}
.hpb-wx-now__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
}
.hpb-wx-now__meta > span {
  background: var(--wx-surface2);
  border: 1px solid var(--wx-border);
  border-radius: 12px;
  padding: .85rem .55rem;
  font-size: .95rem;
  font-weight: 700;
  text-align: center;
  color: var(--wx-text);
}
.hpb-wx-now__meta em {
  display: block;
  font-style: normal;
  color: var(--wx-muted);
  font-size: .72rem;
  font-weight: 500;
  margin-bottom: .3rem;
}

.hpb-wx-forecast-wrap {
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  padding: .65rem .75rem .7rem;
  box-shadow: var(--wx-shadow);
  flex: 0 0 auto;
}
.hpb-wx-forecast__title {
  margin: 0 0 .45rem;
  font-size: .84rem;
  font-weight: 800;
  color: var(--wx-text);
}
.hpb-wx-forecast {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .4rem;
}
.hpb-wx-day {
  background: var(--wx-surface2);
  border: 1px solid var(--wx-border);
  border-radius: 11px;
  padding: .55rem .3rem .6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .28rem;
  color: var(--wx-text);
}
.hpb-wx-day__label {
  font-size: .68rem;
  color: var(--wx-muted);
  line-height: 1.3;
  font-weight: 600;
  min-height: 2.2em;
}
.hpb-wx-day i {
  font-size: 1.25rem;
  color: var(--wx-warn);
}
.hpb-wx-day__cond {
  font-size: .68rem;
  color: var(--wx-muted);
  min-height: 1.25em;
}
.hpb-wx-day__temps {
  display: flex;
  gap: .3rem;
  font-weight: 800;
  font-size: .86rem;
}
.hpb-wx-day__temps .muted {
  color: var(--wx-muted);
  font-weight: 500;
}

.hpb-wx-cal {
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  padding: .65rem .7rem;
  box-shadow: var(--wx-shadow);
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.hpb-wx-cal__today {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .1rem 0 .4rem;
  border-bottom: 1px solid var(--wx-border);
}
.hpb-wx-cal__weekday { color: var(--wx-muted); font-size: .75rem; }
.hpb-wx-cal__month { font-weight: 800; font-size: .92rem; color: var(--wx-text); }
.hpb-wx-cal__clock {
  margin-top: .1rem;
  color: var(--wx-muted);
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
}
.hpb-wx-cal__daynum {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wx-accent);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
  flex: 0 0 auto;
}
.hpb-wx-cal__systems {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
}
.hpb-wx-cal__sys {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--wx-surface2);
  border: 1px solid var(--wx-border);
  border-radius: 10px;
  padding: .4rem .5rem;
  min-width: 0;
}
.hpb-wx-cal__sys > i,
.hpb-wx-cal__zodiac,
.hpb-wx-cal__cross {
  flex: 0 0 auto;
  width: 1.1rem;
  text-align: center;
  color: var(--wx-accent);
  font-size: .95rem;
  line-height: 1;
}
.hpb-wx-cal__zodiac,
.hpb-wx-cal__cross { font-size: 1.05rem; }
.hpb-wx-cal__sys strong {
  color: var(--wx-text);
  font-weight: 700;
  font-size: .78rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hpb-wx-cal__badge {
  display: inline-block;
  margin-top: .15rem;
  padding: .08rem .4rem;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--wx-danger);
  font-size: .65rem;
  font-weight: 800;
}
.hpb-wx-cal__today--holiday .hpb-wx-cal__daynum {
  background: var(--wx-danger);
}
.hpb-wx-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: .28rem;
  flex: 1 1 auto;
  min-height: 0;
}
.hpb-wx-cal__wd {
  text-align: center;
  font-size: .7rem;
  color: var(--wx-muted);
  padding: .15rem 0;
  font-weight: 700;
  align-self: end;
}
.hpb-wx-cal__cell {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: .82rem;
  line-height: 1;
  padding: .15rem;
  box-sizing: border-box;
}
.hpb-wx-cal__j { font-weight: 800; }
.hpb-wx-cal__m {
  font-size: .52rem;
  opacity: .7;
  margin-top: .05rem;
}
.hpb-wx-cal__cell--empty {
  background: transparent;
  pointer-events: none;
}
.hpb-wx-cal__cell--plain {
  background: #e5e7eb;
  color: #111827;
}
.hpb-wx-cal__cell--event {
  background: #bfdbfe;
  color: #1e3a5f;
}
.hpb-wx-cal__cell--holiday {
  background: #dc2626;
  color: #fff;
}
.hpb-wx-cal__cell--today {
  box-shadow: 0 0 0 2px var(--wx-accent);
  font-weight: 800;
}
.hpb-wx-page[data-theme="night"] .hpb-wx-cal__cell--plain {
  background: #475569;
  color: #f8fafc;
}
.hpb-wx-page[data-theme="night"] .hpb-wx-cal__cell--event {
  background: #1e3a5f;
  color: #bfdbfe;
}

.hpb-wx-ticker {
  flex: 0 0 auto;
  overflow: hidden;
  direction: rtl;
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: 12px;
  box-shadow: var(--wx-shadow);
}
.hpb-wx-ticker__track {
  display: flex;
  width: max-content;
  direction: rtl;
  animation: hpb-wx-ticker-rtl 42s linear infinite;
}
.hpb-wx-ticker__group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .55rem 1rem;
  white-space: nowrap;
  direction: rtl;
}
.hpb-wx-ticker__item {
  font-size: .82rem;
  font-weight: 600;
  color: var(--wx-text);
}
.hpb-wx-ticker__item::before {
  content: "•";
  margin-inline-end: .55rem;
  color: var(--wx-accent);
  font-weight: 800;
}
.hpb-wx-ticker:hover .hpb-wx-ticker__track {
  animation-play-state: paused;
}
@keyframes hpb-wx-ticker-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

@media (max-width: 1100px) {
  .hpb-wx-forecast { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hpb-wx-now { grid-template-columns: 1fr; }
  .hpb-wx-page__layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(270px, .95fr);
  }
}
@media (max-width: 900px) {
  body.hpb-wx-standalone,
  .hpb-wx-page {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }
  .hpb-wx-page__shell {
    height: auto;
    grid-template-rows: auto;
  }
  .hpb-wx-page__layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .hpb-wx-page__main,
  .hpb-wx-page__body,
  .hpb-wx-cal { height: auto; }
  .hpb-wx-now { flex: none; }
  .hpb-wx-forecast { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hpb-wx-cal__grid { flex: none; grid-auto-rows: auto; }
  .hpb-wx-page__head { flex-wrap: wrap; }
  .hpb-wx-page__tools { width: 100%; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .hpb-wx-forecast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hpb-wx-now__meta { grid-template-columns: 1fr; }
  .hpb-wx-cal__systems { grid-template-columns: 1fr; }
  .hpb-wx-now__temp { font-size: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hpb-wx-ticker__track { animation: none; }
}
