/* tools-v4-holiday-calendar.css: /tools/social-media-holiday-calendar, on top of tools-v4.css and the pn-system tokens. */

/* Group colours: a bar or a dot next to text, never the text colour itself. */
.tv4 .hc-c-holidays { --hc: #e5484d; }
.tv4 .hc-c-awareness { --hc: #0090ff; }
.tv4 .hc-c-social { --hc: #1b1b1b; }
.tv4 .hc-c-shopping { --hc: #f76b15; }
.tv4 .hc-c-food { --hc: #ffb224; }
.tv4 .hc-c-fun { --hc: #e93d82; }
.tv4 .hc-c-work { --hc: #12a594; }

.tv4 .hc { display: grid; gap: 16px; }

/* ---------- top bar ---------- */
.tv4 .hc-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.tv4 .hc-nav { display: flex; align-items: center; gap: 8px; }
.tv4 .hc-title {
    min-width: 210px;
    margin: 0;
    color: var(--pns-text);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: var(--pns-track-h3);
    line-height: 1.2;
    text-align: center;
}
.tv4 .hc-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--pns-field);
    border-radius: var(--pns-r-btn);
    background: #ffffff;
    color: var(--pns-text);
    cursor: pointer;
}
.tv4 .hc-arrow svg { width: 22px; height: 22px; }
.tv4 .hc-arrow:hover:not(:disabled) { border-color: var(--pns-text); }
.tv4 .hc-arrow:disabled { opacity: 0.35; cursor: default; }
.tv4 .hc-arrow:focus-visible { outline: 2px solid var(--pns-focus); outline-offset: 2px; }
.tv4 .hc-today { margin-left: 8px; }
.tv4 .hc-years { margin-left: 4px; }
.tv4 .hc-years button { height: 36px; font-variant-numeric: tabular-nums; }
.tv4 .hc-country { display: grid; gap: 6px; min-width: 220px; margin: 0; }
.tv4 .hc-country select { height: 44px; }

/* ---------- groups ---------- */
.tv4 .hc-groups { display: flex; flex-wrap: wrap; gap: 8px; }
.tv4 .hc-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--pns-field);
    border-radius: var(--pns-r-chip);
    background: #ffffff;
    color: var(--pns-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.tv4 .hc-group i {
    width: 10px;
    height: 10px;
    border: 1px solid rgba(20, 20, 20, 0.18);
    border-radius: 50%;
    background: var(--hc);
}
.tv4 .hc-group[aria-pressed="false"] { border-style: dashed; color: var(--pns-text-3); }
.tv4 .hc-group[aria-pressed="false"] i { background: transparent; border-color: var(--pns-text-3); }
.tv4 .hc-group:hover { border-color: var(--pns-text); }
.tv4 .hc-group:focus-visible { outline: 2px solid var(--pns-focus); outline-offset: 2px; }

/* ---------- awareness months ---------- */
.tv4 .hc-band { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tv4 .hc-band[hidden] { display: none; }
.tv4 .hc-band__label { color: var(--pns-text-2); font-size: 14px; font-weight: 500; }
.tv4 .hc-band__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--pns-r-chip);
    background: var(--pns-mist);
    color: var(--pns-text);
    font-size: 14px;
}
.tv4 .hc-band__item::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hc);
}

/* ---------- month + panel ---------- */
.tv4 .hc-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 20px;
}
.tv4 .hc-grid {
    overflow: hidden;
    border: 1px solid var(--pns-line);
    border-radius: 20px;
    background: #ffffff;
}
.tv4 .hc-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tv4 .hc-row + .hc-row { border-top: 1px solid var(--pns-line); }
.tv4 .hc-row--head { background: var(--pns-mist); }
.tv4 .hc-wd {
    padding: 10px 10px;
    color: var(--pns-text-2);
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
}
.tv4 .hc-cell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
    min-height: 118px;
    margin: 0;
    padding: 8px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: var(--pns-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.tv4 .hc-cell + .hc-cell { border-left: 1px solid var(--pns-line); }
.tv4 .hc-cell.is-out { background: #fafafa; cursor: default; }
.tv4 .hc-cell.is-out .hc-cell__n { color: #a1a1aa; }
.tv4 button.hc-cell:hover { background: #fafafa; }
.tv4 button.hc-cell:focus-visible { outline: 2px solid var(--pns-focus); outline-offset: -2px; }
.tv4 .hc-cell.is-picked { box-shadow: inset 0 0 0 2px var(--pns-text); }
.tv4 .hc-cell__n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-width: 26px;
    height: 26px;
    margin-bottom: 2px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 500;
}
.tv4 .hc-cell.is-today .hc-cell__n { background: var(--pns-lime); color: var(--pns-on-lime); font-weight: 600; }
.tv4 .hc-cell__item {
    overflow: hidden;
    padding-left: 7px;
    border-left: 3px solid var(--hc);
    color: var(--pns-text);
    font-size: 12.5px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tv4 .hc-cell__more { color: var(--pns-text-2); font-size: 12px; font-weight: 500; }

.tv4 .hc-list { display: none; margin: 0; padding: 0; list-style: none; }
.tv4 .hc-empty {
    margin: 12px 0 0;
    padding: 16px;
    border-radius: 16px;
    background: var(--pns-mist);
    color: var(--pns-text-2);
    font-size: 15px;
}
.tv4 .hc-empty[hidden] { display: none; }
.tv4 .hc-link {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--pns-text);
    font: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.tv4 .hc-panel {
    position: sticky;
    top: 96px;
    display: grid;
    align-content: start;
    gap: 14px;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 20px;
    border: 1px solid var(--pns-line);
    border-radius: 20px;
    background: #ffffff;
}
.tv4 .hc-panel__close { display: none; }
.tv4 .hc-panel__date {
    margin: 0;
    color: var(--pns-text-2);
    font-size: 14px;
    font-weight: 500;
}
.tv4 .hc-panel__hint { margin: 0; color: var(--pns-text-2); font-size: 15px; }
.tv4 .hc-panel__best { justify-self: start; font-size: 14px; }
.tv4 .hc-item { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--pns-line); }
.tv4 .hc-panel__date + .hc-item { padding-top: 0; border-top: 0; }
.tv4 .hc .hc-item__name { margin: 0; color: var(--pns-text); font-size: 19px; font-weight: 600; letter-spacing: var(--pns-track-h3); line-height: 1.25; }
.tv4 .hc .hc-item__local { display: block; margin-top: 2px; color: var(--pns-text-2); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.tv4 .hc-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--pns-text-2); font-size: 13px; }
.tv4 .hc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--pns-r-chip);
    background: var(--pns-mist);
    color: var(--pns-text);
    font-size: 13px;
    font-weight: 500;
}
.tv4 .hc-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--hc); }
.tv4 .hc-care { margin: 4px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--pns-mist); color: var(--pns-text); font-size: 14px; }
.tv4 .hc-item__label { margin: 8px 0 0; color: var(--pns-text-3); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.tv4 .hc-item__idea { margin: 0; color: var(--pns-text); font-size: 15px; line-height: 1.5; }
.tv4 .hc-tags { margin: 0; color: var(--pns-text); font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.tv4 .hc-item__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tv4 .hc-src { justify-self: start; color: var(--pns-text-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.tv4 .hc-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.tv4 .hc-count { margin: 0 auto 0 0; color: var(--pns-text-2); font-size: 14px; }

/* ---------- the year, month by month ---------- */
.tv4 .hc-year { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.tv4 .hc-ym { padding: 24px; border: 1px solid var(--pns-line); border-radius: var(--pns-r-card); background: #ffffff; }
.tv4 .hc-ym h3 { margin: 0 0 12px; font-size: var(--pns-h3); font-weight: 600; }
.tv4 .hc-ym__band { margin: 0 0 12px; color: var(--pns-text-2); font-size: 14px; }
.tv4 .hc-ym ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tv4 .hc-ym li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; font-size: 15px; line-height: 1.45; }
.tv4 .hc-ym time { color: var(--pns-text-2); font-size: 14px; font-weight: 500; }
.tv4 .hc-ym strong { font-weight: 600; }
.tv4 .hc-yearsec .tv4-checked + .tv4-checked { margin-top: 4px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
    .tv4 .hc-body { grid-template-columns: minmax(0, 1fr) 300px; }
    .tv4 .hc-cell { min-height: 104px; }
}
@media (max-width: 900px) {
    .tv4 .hc-body { grid-template-columns: minmax(0, 1fr); }
    .tv4 .hc-panel { position: static; max-height: none; }
    .tv4 .hc-year { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .tv4 .hc-top { align-items: stretch; }
    .tv4 .hc-nav { justify-content: space-between; width: 100%; }
    .tv4 .hc-title { min-width: 0; flex: 1; font-size: 20px; }
    .tv4 .hc-today { margin-left: 0; }
    .tv4 .hc-nav { flex-wrap: wrap; }
    .tv4 .hc-years { order: 5; margin-left: 0; }
    .tv4 .hc-country { width: 100%; min-width: 0; }
    .tv4 .hc-groups { flex-wrap: nowrap; margin: 0 -20px; padding: 0 20px 4px; overflow-x: auto; scrollbar-width: none; }
    .tv4 .hc-groups::-webkit-scrollbar { display: none; }
    .tv4 .hc-group { flex: none; height: 40px; }
    .tv4 .hc-grid { display: none; }
    .tv4 .hc-list { display: grid; gap: 8px; }
    .tv4 .hc-li {
        display: grid;
        gap: 4px;
        width: 100%;
        margin: 0;
        padding: 12px 14px;
        border: 1px solid var(--pns-line);
        border-radius: 14px;
        background: #ffffff;
        color: var(--pns-text);
        font: inherit;
        text-align: left;
        cursor: pointer;
    }
    .tv4 .hc-li.is-today { border-color: var(--pns-text); }
    .tv4 .hc-li__date { display: block; color: var(--pns-text-2); font-size: 13px; font-weight: 500; }
    .tv4 .hc-li__name { padding-left: 8px; border-left: 3px solid var(--hc); font-size: 16px; font-weight: 500; }
    /* The day panel becomes a sheet over the list. */
    .tv4 .hc-panel {
        position: fixed;
        right: 8px;
        bottom: 8px;
        left: 8px;
        z-index: 60;
        max-height: 78vh;
        overflow: auto;
        border-color: var(--pns-text);
        transform: translateY(calc(100% + 16px));
        transition: transform 0.28s var(--pns-ease);
        visibility: hidden;
    }
    .tv4 .hc-panel.is-open { transform: none; visibility: visible; box-shadow: 0 0 0 100vmax rgba(20, 20, 20, 0.45); }
    .tv4 .hc-panel__close {
        position: absolute;
        top: 10px;
        right: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 12px;
        background: var(--pns-mist);
        color: var(--pns-text);
        cursor: pointer;
    }
    .tv4 .hc-panel__close svg { width: 20px; height: 20px; }
    .tv4 .hc-actions { justify-content: stretch; }
    .tv4 .hc-actions .tv4-btn { flex: 1 1 auto; }
    .tv4 .hc-count { width: 100%; }
    .tv4 .hc-ym { padding: 18px; }
    .tv4 .hc-ym li { grid-template-columns: 56px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .tv4 .hc-panel { transition: none; }
}

/* Month and day names start with a capital letter (pt "janeiro de 2027" -> "Janeiro de 2027"); the rest stays as the
   locale writes it, so "1 de janeiro" never becomes "1 De Janeiro". */
.tv4 .hc-title::first-letter,
.tv4 .hc-ym h3::first-letter,
.tv4 .hc-panel__date::first-letter,
.tv4 .hc-li__date::first-letter { text-transform: uppercase; }
