/* Additions for the holiday integration; base look comes from /includes/css/style.css */
.staging-banner { background: #fff3cd; border: 1px solid #ffc107; color: #6b4e00; padding: 8px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.staging-banner a { color: #6b4e00; }

.year-nav { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin: -10px 0 20px; font-size: 15px; }
.year-nav a { color: #764ba2; font-weight: bold; text-decoration: none; }
.year-nav a:hover { text-decoration: underline; }
.year-nav input { width: 80px; padding: 4px 6px; font-size: 15px; border: 1px solid #bbb; border-radius: 4px; }
.year-nav button { padding: 4px 12px; border: 0; border-radius: 4px; background: #667eea; color: #fff; font-weight: bold; cursor: pointer; }

/* Category selectors, kept at the top of the calendar while scrolling */
.holiday-filters { position: relative; background: #fff; border-radius: 10px; padding: 12px 16px; margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12); border-top: 4px solid #764ba2; }
.filters-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.filters-head strong { font-size: 16px; color: #333; }
.filter-count { color: #666; font-size: 13px; flex: 1; }
.filter-reset, .chip-actions button { border: 1px solid #c9c2e3; background: #f6f4fc; color: #5a3d8a; border-radius: 12px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.filter-reset:hover, .chip-actions button:hover { background: #ebe6f8; }
.filter-group { display: grid; grid-template-columns: 90px auto 1fr; align-items: start; gap: 8px; padding: 6px 0; border-top: 1px solid #eee; }
.filter-label { font-weight: bold; font-size: 13px; color: #444; padding-top: 4px; }
.chip-actions { display: flex; gap: 4px; padding-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 6px; border-radius: 16px; border: 1px solid #667eea;
    background: #eef0ff; color: #2c2c6c; font-size: 13px; cursor: pointer; user-select: none; transition: background .15s, opacity .15s; }
.chip input { margin: 0; accent-color: #667eea; }
.chip small { color: #666; font-size: 11px; }
.chip.off { background: #f5f5f5; border-color: #ccc; color: #888; }
.chip-meta { border-style: dashed; }
.chip-flag { width: 16px; height: 11px; border: 1px solid #ddd; }
.chip-symbol { width: 16px; height: 16px; object-fit: contain; }

/* Holidays in cells */
.holiday-item.is-filtered, .holiday-item.is-overflow, .holiday-more[hidden] { display: none; }
.holiday-item a.holiday-name { color: #333; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.holiday-item a.holiday-name:hover { text-decoration: underline; color: #1a5a8a; }
.holiday-item.observed a.holiday-name { font-style: italic; }
.special-day .day-content { margin-top: 10px; text-align: left; font-size: 12px; }
.special-day .holiday-name { font-size: 12px; }
.tag-national { background-color: #c0392b; }
.tag-civic { background-color: #2c3e50; }
.tag-religious { background-color: #8e44ad; }
.tag-cultural { background-color: #16a085; }
.tag-commemorative { background-color: #7f8c8d; }
.tag-seasonal { background-color: #27ae60; }
.tag-international_day { background-color: #2980b9; }
.day-cell.today { outline: 3px solid #ffc107; outline-offset: -3px; background: #fffbea; }
.special-day-container.today { box-shadow: 0 0 0 4px #ffc107; }
.feed-error { background: #fdecea; border: 1px solid #e74c3c; color: #922; padding: 14px; border-radius: 6px; margin-bottom: 30px; }

@media (max-width: 700px) {
    .filter-group { grid-template-columns: 1fr; }
    .holiday-filters { position: static; max-height: none; }
    .calendar-table thead th { font-size: 10px; padding: 4px 1px; }
    .day-cell { padding: 3px; height: 90px; }
}
@media print {
    .staging-banner, .year-nav, .holiday-filters { display: none; }
}

/* "How we'd switch" page */
.switch-link { display: inline-block; margin-top: 6px; color: #ffd700; font-weight: bold; text-decoration: none; border-bottom: 2px solid #ffd700; }
.switch-link:hover { color: #fff; border-bottom-color: #fff; }
.year-nav .switch-nav { color: #e65100; }
.sw-section p { line-height: 1.6; font-size: 16px; color: #333; margin-bottom: 14px; max-width: 900px; margin-left: auto; margin-right: auto; }
.sw-lead, .sw-caption { text-align: center; }
.sw-caption { font-style: italic; color: #555 !important; font-size: 14px !important; }
.sw-strip { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 18px auto; max-width: 900px; padding: 0; }
.sw-day { width: 44px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff;
    border: 1px solid #ccc; border-radius: 4px; font-weight: bold; font-size: 17px; color: #333; }
.sw-day small { font-size: 9px; font-weight: normal; color: #777; text-transform: uppercase; }
.sw-strip > .sw-day:first-child { border: 2px solid #764ba2; background: #f3effa; }
.sw-gap { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 10px; min-height: 44px;
    background: #fff9e6; border: 2px dashed #ffc107; border-radius: 6px; }
.sw-gap-days { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.sw-gap-days s { color: #bbb; font-size: 12px; }
.sw-gap-label { font-size: 11px; font-weight: bold; color: #e65100; text-transform: uppercase; letter-spacing: .03em; }
.sw-math { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 10px 0 18px; }
.sw-math > div:not(.sw-op) { display: flex; flex-direction: column; align-items: center; background: #f3effa; border: 2px solid #667eea;
    border-radius: 8px; padding: 10px 18px; font-size: 12px; color: #555; }
.sw-big { font-size: 22px; font-weight: bold; color: #333; }
.sw-op { font-weight: bold; color: #e65100; font-size: 18px; }
.sw-note { font-size: 13px !important; color: #666 !important; font-style: italic; }
@media (max-width: 700px) {
    .sw-day { width: 38px; height: 38px; font-size: 15px; }
    .sw-gap { width: 100%; }
    .sw-section p { font-size: 15px; }
}

/* Round 3: API-driven filters + client-rendered cells */
.chip:has(input:not(:checked)) { background: #f5f5f5; border-color: #ccc; color: #888; }
.chip:has(input:not(:checked)) .chip-symbol { opacity: .45; }
.chip-family { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 2px; border-radius: 18px; background: #f7f3fc; }
.chip-kid { font-size: 12px; padding: 2px 8px 2px 5px; border-color: #a99bd6; }
.chips-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.country-chip { font: inherit; font-size: 13px; }
.country-chip:disabled { opacity: .45; cursor: default; }
.country-chip .holiday-flag { width: 16px; height: 11px; margin: 0; }
#addCountry { font-size: 13px; padding: 3px 6px; border-radius: 14px; border: 1px solid #667eea; background: #fff; max-width: 220px; }
#addCountry:disabled { opacity: .45; }
.more-filters { margin-top: 6px; }
.more-filters summary { cursor: pointer; color: #5a4a9c; font-size: 13px; font-weight: 600; padding: 4px 0; }
.holiday-item { align-items: center; }
.holiday-emblem { width: 12px; height: 12px; object-fit: contain; flex: none; margin-right: 2px; }
.holiday-globe { font-size: 10px; flex: none; margin-right: 2px; line-height: 1; }
.more-holidays { list-style: none; margin-top: 2px; }
.more-holidays button { border: 0; background: none; padding: 0; color: #2980b9; font-weight: bold; font-size: 10px; cursor: pointer; }
.more-holidays button:hover { text-decoration: underline; }
.popup-close { position: absolute; top: 6px; right: 10px; border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: #555; }
.holiday-popup { max-height: 80vh; overflow-y: auto; }
.popup-holiday-list .holiday-emblem { width: 16px; height: 16px; }
.popup-holiday-list .holiday-item { display: flex; gap: 6px; }
.holiday-region { color: #888; font-size: 0.85em; margin-left: 2px; overflow-wrap: anywhere; }
@media (max-width: 700px) { .day-cell .holiday-region { display: none; } }
/* language menu */
.lang-menu { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px 4px; font-size: 13px; margin: 0 0 8px; }
.lang-menu a { color: #555; text-decoration: none; padding: 2px 7px; border-radius: 12px; border: 1px solid transparent; white-space: nowrap; }
.lang-menu a:hover { border-color: #c7cdf5; color: #333; }
.lang-menu a.current { background: #667eea; color: #fff; }
.lang-globe { margin-right: 2px; }
.calendar-table thead th .wd-short { display: none; }
@media (max-width: 700px) {
    .lang-menu { justify-content: center; font-size: 12px; }
    .calendar-table thead th .wd-long { display: none; }
    .calendar-table thead th .wd-short { display: inline; }
}
@media print { .lang-menu { display: none; } }
/* 2030 transition year */
.tr-intro p, .tr-note { max-width: 900px; margin: 0 auto 12px; line-height: 1.6; font-size: 15px; color: #333; }
.tr-intro p { font-size: 16px; }
.tr-note { text-align: center; color: #555; }
.tr-jan-note { font-weight: 600; color: #b45309; }
.tr-gap .month-header { font-size: 26px; }
.day-cell.day-empty { background: #f7f7f9; }
.day-cell.day-gregorian-only { background: repeating-linear-gradient(135deg, #fff, #fff 8px, #f5f5f7 8px, #f5f5f7 16px); }
.day-cell.tr-after-skip { box-shadow: inset 4px 0 0 #f59e0b; }
.tr-skip-mark { font-size: 10px; color: #b45309; font-weight: 600; line-height: 1.1; margin: 2px 0; white-space: nowrap; }
.tr-end { border-color: #667eea; }
.tr-skipped-list { list-style: none; padding: 0; margin: 10px auto; max-width: 1000px; columns: 3 260px; column-gap: 24px; }
.tr-skipped-list li { break-inside: avoid; padding: 3px 0; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.tr-skipped-list li[hidden] { display: none; }
.tr-skipped-list a { color: #333; text-decoration: none; }
.tr-skipped-list a:hover { text-decoration: underline; }
.year-boundary .special-day-explanation { font-weight: 600; }
@media (max-width: 700px) { .tr-skip-mark { font-size: 8px; white-space: normal; } }
@media (max-width: 700px) { .day-cell .day-of-year { display: none; } }

/* Roadmap page */
.year-nav .roadmap-nav { color: #1a5a8a; }
.rm-sub { font-size: 20px; color: #333; text-align: center; margin: 22px 0 12px; }
.rm-stages { max-width: 900px; margin: 0 auto 20px; padding-left: 1.3em; line-height: 1.6; font-size: 16px; color: #333; }
.rm-stages li { margin-bottom: 8px; }
.rm-en-note, .rm-source, .rm-planned-label { max-width: 900px; margin: 0 auto 14px; font-size: 14px; color: #555; line-height: 1.55; }
.rm-source { font-size: 13px; font-style: italic; }
.rm-source a { color: #5a3d8a; }
.rm-table-wrap { overflow-x: auto; margin: 16px auto 18px; max-width: 960px; }
.rm-table { width: 100%; border-collapse: collapse; font-size: 15px; color: #333; }
.rm-table caption { font-weight: 600; text-align: left; margin-bottom: 8px; color: #444; }
.rm-table th, .rm-table td { border-bottom: 1px solid #e6e0f0; padding: 8px 10px; text-align: right; vertical-align: middle; }
.rm-table thead th { background: #f3effa; font-size: 13px; font-weight: 600; color: #5a3d8a; text-align: right; }
.rm-table tbody th, .rm-table thead th:first-child, .rm-table td:first-child { text-align: left; }
.rm-table .rm-n { font-weight: 600; }
.rm-table small { color: #666; font-weight: normal; }
.rm-cover { white-space: nowrap; }
.rm-bar { display: inline-block; width: 72px; height: 8px; background: #eee; border-radius: 4px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.rm-bar-fill { display: block; height: 100%; background: #667eea; border-radius: 4px; }
.rm-planned-label { font-weight: 700; color: #e65100; text-transform: uppercase; letter-spacing: .03em; font-size: 12px !important; text-align: center; }
.rm-planned { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 auto 18px; padding: 0; max-width: 900px; }
.rm-planned li { display: flex; flex-direction: column; align-items: center; gap: 2px; background: #f3effa; border: 1px solid #c9c2e3; border-radius: 8px; padding: 8px 14px; min-width: 140px; font-size: 15px; color: #333; }
.rm-planned .rm-native { font-size: 13px; color: #555; }
.rm-fields { max-width: 900px; margin: 0 auto 18px; padding-left: 1.3em; line-height: 1.6; font-size: 16px; color: #333; columns: 2 280px; column-gap: 32px; }
.rm-fields li { break-inside: avoid; margin-bottom: 6px; }
@media (max-width: 700px) {
    .rm-stages, .rm-fields { font-size: 15px; }
    .rm-fields { columns: 1; }
    .rm-table { font-size: 13px; }
    .rm-bar { width: 48px; }
}
@media print {
    .year-nav .roadmap-nav { display: none; }
}
.rm-progress-label { color: #3d4fb8 !important; }
