/*
############################################################################
# Full d'estils de la pàgina de gelades (wxfreeze.php)
############################################################################
*/

:root {
    --bg: #f3f5f8;
    --card: #ffffff;
    --text: #1f2a37;
    --muted: #64748b;
    --line: #dfe5ec;
    --head-bg: #e9eef4;
    --head-text: #2c3e50;
    --accent: #11557c;
    --accent-dark: #0b3a57;
    --accent-soft: #e4f0f7;
    --ice: #dff0fb;
    --ice-strong: #b9dcf3;
    --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

a { color: var(--accent); }

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Capçalera i peu ---------- */

.site-header {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent) 60%, #1f7aa8);
    color: #fff;
    padding: 18px 0;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(11, 58, 87, .25);
}
.site-header .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
}
.site-header .brand {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .01em;
}
.site-header .brand-sub {
    font-size: .95rem;
    opacity: .8;
}

body.embedded { padding-top: 16px; }

.site-footer a { color: inherit; }

.site-footer {
    color: var(--muted);
    font-size: .78rem;
    text-align: right;
    padding: 20px 0 32px;
}

/* ---------- Targeta ---------- */

#main-copy {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    padding: 24px;
}

#report h1 {
    margin: 0 0 18px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-dark);
}

#report .report-head { text-align: center; }

/* ---------- Taules ---------- */

#report table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

#report .table-scroll {
    overflow-x: auto;
    margin-top: 22px;
}

#report table.summary {
    max-width: 640px;
    margin: 0 auto;
}
#report table.summary .reportday,
#report table.summary .rowlabel { white-space: normal; }

#report th,
#report td {
    border: 1px solid #fff;
    padding: 6px 8px;
    text-align: center;
    font-size: .85rem;
}

#report .labels {
    background-color: var(--accent);
    color: #fff;
    font-weight: 600;
    vertical-align: bottom;
}
#report .labels .unit {
    font-weight: 400;
    font-size: .78rem;
    opacity: .85;
    white-space: nowrap;
}

#report .rowlabel {
    background-color: var(--head-bg);
    color: var(--head-text);
    font-weight: 600;
    white-space: nowrap;
}
#report .rowlabel.stat { text-align: right; }

#report .reportday {
    background-color: var(--ice);
    color: var(--text);
    white-space: nowrap;
}
#report .reportday .temp {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 600;
}
#report .reportday.count {
    font-weight: 600;
    background-color: var(--ice-strong);
}
#report .reportday.zero,
#report .reportday.nodata {
    background-color: #f7f9fb;
    color: #9aa8b8;
    font-weight: 500;
}

#report .separator {
    background: transparent;
    border: none;
    height: 12px;
    padding: 0;
}

#report .note {
    font-size: .8rem;
    color: var(--muted);
    margin: 8px 0 0;
}

#report .infotext {
    background-color: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    font-size: .85rem;
    padding: 10px 14px;
    margin: 18px 0 0;
}

/* ---------- Mòbil i impressió ---------- */

@media (max-width: 700px) {
    body { font-size: 14px; }
    #main-copy { padding: 14px; border-radius: 0; margin: 0 -16px; border-left: none; border-right: none; }
    #report h1 { font-size: 1.3rem; }
    #report th, #report td { padding: 5px 6px; font-size: .8rem; }
}

@media print {
    body { background: #fff; font-size: 11px; }
    .site-header { display: none !important; }
    #main-copy { border: none; box-shadow: none; padding: 0; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
