/* Site notice (iClub › Configuració › Avís web, shared/header.php): a strip
   under the menu and a card shown once per version (site-notice.js). Each
   level sets its own tones; the layout is shared. */
.site-notice, .site-notice-card {
    --sn-bg: #fff8e6; --sn-line: #f1d48a; --sn-ink: #4a3600; --sn-accent: #c27c0e; --sn-badge: #fdeac2;
}
.site-notice--info     { --sn-bg: #eef6fc; --sn-line: #c9e0f2; --sn-ink: #0b3954; --sn-accent: #1f78b4; --sn-badge: #d8ebf8; }
.site-notice--critical { --sn-bg: #fdf0ef; --sn-line: #f2c4c0; --sn-ink: #5c1712; --sn-accent: #c23a2e; --sn-badge: #fadcd9; }
.site-notice--success  { --sn-bg: #eef9f2; --sn-line: #c5e8d2; --sn-ink: #123f26; --sn-accent: #1f8a4c; --sn-badge: #d5f0df; }

.site-notice {
    background: var(--sn-bg);
    border-bottom: 1px solid var(--sn-line);
    color: var(--sn-ink);
}
.site-notice-inner {
    display: flex;
    align-items: center;
    gap: .75rem;
    max-width: 1320px;
    margin: 0 auto;
    padding: .55rem 1rem;
    font-size: .875rem;
    line-height: 1.4;
}
.site-notice-icon {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--sn-badge);
    color: var(--sn-accent);
    font-size: .9rem;
}
.site-notice-text { margin: 0; flex: 1; min-width: 0; }
.site-notice-text strong { font-weight: 700; }
.site-notice-open, .site-notice-link {
    flex: none;
    border: 1px solid var(--sn-line);
    background: #fff;
    color: var(--sn-ink);
    border-radius: 999px;
    padding: .3rem .8rem;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    min-height: 32px;
    transition: border-color .15s, color .15s;
}
.site-notice-open:hover, .site-notice-link:hover { border-color: var(--sn-accent); color: var(--sn-accent); }
.site-notice-link .bi { font-size: .75rem; }
@media (max-width: 575.98px) {
    .site-notice-inner { align-items: flex-start; flex-wrap: wrap; padding: .6rem .875rem; }
    .site-notice-text { flex-basis: calc(100% - 2.6rem); }
    .site-notice-open, .site-notice-inner > .site-notice-link { margin-left: 2.5rem; }
}

/* The card: bottom-centred, never covering the whole page; above the phone
   tab bar, like the cookie banner. */
.site-notice-card {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1030;
    max-width: 30rem;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 1rem;
    background: #fff;
    border: 1px solid var(--ui-line, #e3e8ee);
    border-top: 4px solid var(--sn-accent);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(8, 47, 71, .22), 0 2px 6px rgba(8, 47, 71, .08);
    color: #22313f;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease;
}
.site-notice-card.is-open { opacity: 1; transform: none; }
.site-notice-card[hidden] { display: none; }
.site-notice-badge {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: var(--sn-badge);
    color: var(--sn-accent);
    font-size: 1.2rem;
    margin-bottom: .75rem;
}
.site-notice-card-title { margin: 0 2rem .35rem 0; font-size: 1.05rem; font-weight: 700; color: var(--global-palette2, #0b2a3f); line-height: 1.3; }
.site-notice-card-body { margin: 0 0 1rem; font-size: .9rem; line-height: 1.5; color: #44515e; }
.site-notice-actions { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; flex-wrap: wrap; }
.site-notice-actions .btn { min-height: 36px; padding-inline: 1rem; border-radius: 999px; font-weight: 600; }
.site-notice-close {
    position: absolute;
    top: .6rem;
    right: .6rem;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7785;
}
.site-notice-close:hover { background: #f1f4f7; color: #22313f; }
@media (max-width: 991.98px) {
    .site-notice-card { bottom: calc(66px + 1rem + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
    .site-notice-card { transition: none; }
}
