/* =========================================================
   Rainfall Dashboard – default UI (scoped)
   ========================================================= */

.rfd-dashboard, .rfd-dashboard *,
.rain-filter, .rain-filter *,
.rain-period, .rain-chart-wrap, .rain-chart-wrap *,
.rain-table-wrap, .rain-table-wrap *,
.rain-total, .rain-total *,
.rain-stats-grid, .rain-stats-grid *,
.rain-stat-card, .rain-stat-card *,
.rain-empty,
.rain-days-count, .rain-days-count *,
.rfd-builder-layout, .rfd-builder-layout * {
  font-family: 'Noto Sans Hebrew', Arial, sans-serif;
}

/* grid */
.rfd-grid{ display:grid; grid-template-columns:1fr; gap:16px; margin:10px 0 16px; }
.rfd-totals{ display:grid; grid-template-columns:1fr; gap:16px; margin:10px 0 18px; }
@media (min-width:900px){ .rfd-grid{ grid-template-columns:1fr 1fr; } .rfd-totals{ grid-template-columns:1fr 1fr; } }

/* filter */
.rain-filter{ display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; margin:10px 0 12px; }
.rain-filter label{ display:flex; align-items:center; gap:8px; margin:0; font-size:16px; font-weight:600; color:rgba(0,0,0,0.85); }
.rain-filter select, .rain-filter button{ height:44px; line-height:44px; border-radius:10px; font-size:16px; box-sizing:border-box; }

/* custom select arrow for RTL/mobile */
.rain-filter select{
  border:1px solid rgba(0,0,0,0.22); background:#fff; color:rgba(0,0,0,0.9);
  min-width:180px; direction:rtl; text-align:right;
  padding:0 14px 0 12px; padding-right:56px;
  -webkit-appearance:none; -moz-appearance:none; appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='%23111' d='M7 10l5 5l5-5z'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 16px center; background-size:18px;
  text-overflow:ellipsis;
}

.rain-filter button{
  padding:0 18px;
  background:#1e73be;
  color:#fff;
  border:0;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(30,115,190,0.18);
}
.rain-filter button:hover{ filter:brightness(0.92); }

.rain-filter a{ align-self:center; font-size:16px; font-weight:600; color:#1e73be; text-decoration:underline; }
.rain-filter a:hover{ filter:brightness(0.85); }

/* period line */
.rain-filter + .rain-period{ margin-top:42px; }
.rain-period{ margin:8px 0 0; color:rgba(0,0,0,0.72); font-size:15px; }
.rain-period strong{ color:rgba(30,115,190,0.95); }

/* cards */
.rain-chart-wrap, .rain-table-wrap, .rain-total{
  background:#fff;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:18px;
  box-shadow:0 8px 22px rgba(0,0,0,0.05);
  overflow:hidden;
}
.rain-chart-wrap{ padding:14px 14px 10px; margin:10px 0 18px; }
.rain-chart-wrap canvas{ border-radius:12px; }

.rain-total{ padding:18px 22px; text-align:center; box-shadow:0 8px 22px rgba(0,0,0,0.06); }
.rain-total__title{ font-size:34px; font-weight:800; color:#1e73be; margin:0 0 6px; line-height:1.1; }
.rain-total__value{ font-size:22px; font-weight:600; color:#111; margin:0; }

.rain-empty{
  background:#fff;
  border:1px dashed rgba(30,115,190,0.35);
  border-radius:16px;
  padding:18px 20px;
  text-align:center;
  color:rgba(0,0,0,0.75);
  font-size:18px;
  font-weight:600;
  box-shadow:0 6px 18px rgba(0,0,0,0.05);
}

/* table */
.rain-table-wrap{ padding:14px 14px 10px; margin:10px 0 18px; direction:rtl; }
.rain-table-title{ font-size:16px; font-weight:800; color:rgba(0,0,0,0.75); margin:0 0 10px; }
.rain-table{ width:100%; border-collapse:collapse; font-size:15px; line-height:1.35; background:transparent; direction:rtl; }
.rain-table th, .rain-table td{
  padding:10px 8px;
  border-bottom:1px solid rgba(0,0,0,0.08);
  vertical-align:middle;
  text-align:right;
}
.rain-table thead th{ font-weight:800; color:rgba(0,0,0,0.75); background:rgba(0,0,0,0.02); }
.rain-table tbody tr:hover{ background:rgba(30,115,190,0.08); }
.rain-table tfoot td{ border-top:1px solid rgba(0,0,0,0.10); border-bottom:none; padding-top:12px; background:rgba(0,0,0,0.015); font-weight:700; }

/* responsive */
@media (max-width:768px){
  .rain-filter{ align-items:stretch; gap:10px; }
  .rain-filter label{ width:100%; justify-content:space-between; }
  .rain-filter select{ width:62%; min-width:0; }
  .rain-filter button, .rain-filter a{ width:100%; }
  .rain-filter a{ text-align:center; }

  .rain-chart-wrap{ padding:12px 12px 10px; margin:10px 0 14px; }
  .rain-total__title{ font-size:30px; }
  .rain-total__value{ font-size:20px; }

  .rain-table-wrap{ padding:12px; }
  .rain-table th, .rain-table td{ padding:9px 6px; }
  .rain-table{ font-size:14px; }
}

.rain-stats-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
  margin:20px 0;
}

.rain-stat-card{
  background:#fff;
  border-radius:18px;
  padding:20px;
  text-align:center;
  box-shadow:0 8px 22px rgba(0,0,0,.05);
}

.rain-stat-value{
  font-size:28px;
  font-weight:800;
  color:#1e73be;
}

.rain-stat-label{
  margin-top:6px;
  font-weight:600;
  color:rgba(0,0,0,.65);
}

/* rain_days_count card */
.rain-days-count .rain-total__year,
.rain-days-count__year {
  font-size: 13px;
  color: rgba(0,0,0,.45);
  margin-top: 4px;
  font-weight: 500;
}
