/* ============================================================
   Three-Month Season Calendar
   ============================================================ */

/* ── Wrapper ── */
.uc-season-wrap {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0 40px;
    box-sizing: border-box;
}

/* ── Three-month row ── */
.uc-season-months-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 1024px) {
    .uc-season-months-row {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ── Month wrapper (title + bordered box) ── */
.uc-season-month-wrapper {
    display: flex;
    flex-direction: column;
}

/* ── Month title (outside, above the bordered box) ── */
.uc-season-month-title {
    margin: 0 0 16px 0;
    padding: 0;
    font-family: Fredoka, sans-serif !important;
    font-size: 30px !important;
    line-height: calc(2.25 / 1.875);
    font-weight: 900 !important;
    color: rgb(23, 172, 75);
    animation: ucTitleSlideIn 0.35s ease-out both;
}

@keyframes ucTitleSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .uc-season-month-title {
        animation: none;
    }
}

/* ── Single month (bordered box) ── */
.uc-season-month {
    border: 3px solid #17AC4B;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

/* ── Weekday header ── */
.uc-season-month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #17AC4B;
    color: #fff;
    font-family: Nunito, sans-serif !important;
    font-weight: 600;
    font-size: 13px;
    text-transform: capitalize;
}

.uc-season-month-header span {
    text-align: center;
    padding: 8px 4px;
}

/* ── Month body (weeks) ── */
.uc-season-month-body {
    padding: 0;
}

/* ── Week row (consistent height) ── */
.uc-season-week-row {
    border-bottom: 1px solid #EEEEEE;
    padding-bottom: 4px;
    min-height: 120px;
}

.uc-season-week-row:last-child {
    border-bottom: none;
}

/* ── Today button ── */
.uc-season-today-row {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
    padding-top: 10px;
}

@media (max-width: 1024px) {
    .uc-season-today-row {
        grid-row: 3;
    }
}

.uc-season-today-hidden {
    visibility: hidden;
    pointer-events: none;
}

.uc-season-today-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 18px;
    background: #fff;
    border: 2px solid #17AC4B;
    border-radius: 20px;
    color: #17AC4B;
    font-family: Nunito, sans-serif !important;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.uc-season-today-btn:hover,
.uc-season-today-btn:focus {
    background: #17AC4B;
    color: #fff;
    outline: none;
}

.uc-season-today-btn.is-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* ── "+X more" label ── */
.uc-season-more-label {
    font-family: Nunito, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    padding: 2px 10px;
}

/* ── Date numbers row ── */
.uc-season-dates-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.uc-season-date {
    text-align: center;
    padding: 6px 4px 2px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.uc-season-date-outside {
    color: #C0C0C0;
}

/* ── Event bars row ── */
.uc-season-events-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 1px 2px;
    gap: 0;
}

.uc-season-event-bar {
    position: relative;
    border-radius: 10px;
    padding: 3px 10px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: transform 0.15s;
    min-height: 24px;
    display: flex;
    align-items: center;
}

/* Inner white ring shown on hover, focus, and when the tooltip is open */
.uc-season-event-bar::after {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1.5px solid #fff;
    border-radius: 7px;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}

.uc-season-event-bar:hover::after,
.uc-season-event-bar:focus::after,
.uc-season-event-bar:focus-visible::after,
.uc-season-event-bar.is-active::after {
    opacity: 1;
}

.uc-season-event-bar:hover,
.uc-season-event-bar.is-active {
    transform: scale(1.02);
}

.uc-season-event-bar:focus-visible {
    outline: 2px solid #4A4A8A;
    outline-offset: 1px;
}

.uc-season-event-label {
    font-family: Nunito, sans-serif !important;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   Floating Tooltip (matches CampBar/CampTooltip React components)
   ============================================================ */
.uc-season-tooltip {
    position: fixed;
    z-index: 99999;
    max-width: 420px;
    width: calc(100vw - 32px);
    pointer-events: auto;
    animation: ucTooltipFadeIn 0.15s ease-out;
}

@keyframes ucTooltipFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hide the old overlay (no longer used) */
.uc-season-popup-overlay { display: none !important; }

/* Tooltip inner container */
.uc-tooltip-inner {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #17AC4B;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Arrow pointing at the event bar — direction depends on side */
.uc-tooltip-inner::before,
.uc-tooltip-inner::after {
    content: "";
    position: absolute;
    top: var(--uc-arrow-top, 50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Outer arrow = border color */
.uc-season-tooltip.uc-tooltip-right .uc-tooltip-inner::before {
    left: -12px;
    border-right: 12px solid #17AC4B;
}
.uc-season-tooltip.uc-tooltip-left .uc-tooltip-inner::before {
    right: -12px;
    border-left: 12px solid #17AC4B;
}

/* Inner arrow = fill color, sits on top to create the notch effect */
.uc-season-tooltip.uc-tooltip-right .uc-tooltip-inner::after {
    left: -9px;
    border-right: 12px solid #fff;
}
.uc-season-tooltip.uc-tooltip-left .uc-tooltip-inner::after {
    right: -9px;
    border-left: 12px solid #fff;
}

/* Close button */
.uc-tooltip-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    z-index: 2;
    padding: 4px;
    transition: color 0.2s;
}

.uc-tooltip-close:hover {
    color: #374151;
}

/* Body spacing */
.uc-tooltip-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Header */
.uc-tooltip-header {
    padding-right: 24px;
}

.uc-tooltip-title {
    font-family: Fredoka, sans-serif !important;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #17AC4B;
    margin: 0;
}

.uc-tooltip-theme {
    font-family: Nunito, sans-serif !important;
    font-size: 14px;
    font-weight: 600;
    color: #636466;
    letter-spacing: -0.025em;
    margin: 4px 0 0;
}

/* Info rows (date, age) */
.uc-tooltip-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uc-tooltip-info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
}

.uc-tooltip-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.uc-tooltip-icon-calendar {
    color: #17AC4B;
}

.uc-tooltip-icon-smile {
    color: rgb(248, 201, 37);
}

.uc-tooltip-info-text {
    font-family: Nunito, sans-serif !important;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.025em;
}

/* Description */
.uc-tooltip-desc {
    font-family: Nunito, sans-serif !important;
    font-size: 14px;
    color: #374151;
    line-height: 1.625;
    letter-spacing: -0.025em;
    margin: 0;
}

.uc-tooltip-see-more {
    color: rgb(23, 172, 75);
    font-weight: 600;
    text-decoration: none;
}

.uc-tooltip-see-more:hover {
    color: rgb(20, 144, 63);
    text-decoration: underline;
}

/* Sessions section */
.uc-tooltip-sessions {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
}

.uc-tooltip-sessions-label {
    font-family: Nunito, sans-serif !important;
    font-size: 12px;
    font-weight: 700;
    color: #17AC4B;
    letter-spacing: -0.025em;
    margin: 0 0 8px;
}

.uc-tooltip-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 140px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Individual session variant */
.uc-tooltip-variant {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    padding: 12px;
    border-radius: 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    gap: 4px;
}

.uc-tooltip-variant.is-selectable {
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.uc-tooltip-variant.is-selectable:hover {
    border-color: rgba(23, 172, 75, 0.4);
    background: #f0faf4;
}

.uc-tooltip-variant.is-selected {
    border-color: #17AC4B;
    background: #edfaf3;
    box-shadow: 0 0 0 1px #17AC4B;
}

/* Top row: session name + spots on same line */
.uc-tooltip-variant-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.uc-tooltip-variant-name {
    font-family: Nunito, sans-serif !important;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.025em;
    flex: 1;
    min-width: 0;
}

.uc-tooltip-variant-spots {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-family: Nunito, sans-serif !important;
    font-weight: 700;
    flex-shrink: 0;
    color: #6b7280;
}

/* Bottom row: time + price */
.uc-tooltip-variant-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #4b5563;
    font-family: Nunito, sans-serif !important;
    letter-spacing: -0.025em;
}

.uc-tooltip-variant-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.uc-tooltip-variant-price {
    font-weight: 600;
    color: #17AC4B;
}

.uc-tooltip-icon-sm {
    flex-shrink: 0;
}

/* CTA button */
.uc-tooltip-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    margin-top: 4px;
    background: #0d7a35;
    color: #fff !important;
    font-family: Nunito, sans-serif !important;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s;
}

.uc-tooltip-cta:hover {
    background: #0a5e29;
    color: #fff !important;
    text-decoration: none !important;
}

.uc-tooltip-cta-disabled,
.uc-tooltip-cta-disabled:hover {
    background: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* Scrollbar for sessions list */
.uc-tooltip-sessions-list::-webkit-scrollbar {
    width: 4px;
}

.uc-tooltip-sessions-list::-webkit-scrollbar-track {
    background: transparent;
}

.uc-tooltip-sessions-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.uc-tooltip-sessions-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .uc-season-month-title {
        font-size: 17px;
        padding: 10px 12px;
    }

    .uc-season-date {
        font-size: 12px;
        padding: 4px 2px 1px;
    }

    .uc-season-event-label {
        font-size: 11px;
    }

    .uc-season-event-bar {
        padding: 2px 6px;
        min-height: 20px;
    }

    .uc-season-popup {
        max-width: 100%;
        border-radius: 12px;
    }

    .uc-season-popup-content {
        padding: 20px;
    }

    .uc-season-popup-content .uc-popup-title {
        font-size: 18px;
    }
}

/* ============================================================
   Mobile tooltip — full-viewport modal with backdrop
   Positioned by JS adding .uc-tooltip-mobile on viewports ≤ 640px
   ============================================================ */
.uc-season-tooltip.uc-tooltip-mobile {
    position: fixed;
    inset: 0;
    width: auto;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
    z-index: 100000;
    animation: ucTooltipBackdropFade 0.15s ease-out;
}

@keyframes ucTooltipBackdropFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-inner {
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px 20px 20px;
    border-radius: 14px;
    position: relative;
}

/* Hide the side arrow on mobile */
.uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-inner::before,
.uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-inner::after {
    display: none;
}

/* Close button: bigger tap target, stays pinned to the top-right */
.uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    z-index: 2;
}

@media (max-width: 640px) {
    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-header {
        margin-top: 6px;
    }

    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-title {
        padding-right: 44px; /* room for the 36px close button + gap */
        font-size: 20px;
        line-height: 1.25;
        margin-top: 0;
        margin-bottom: 4px;
        word-break: break-word;
    }

    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-theme {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-info-row {
        font-size: 15px;
        gap: 8px;
    }

    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-desc {
        font-size: 14px;
        line-height: 1.5;
        margin: 10px 0;
    }

    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-sessions {
        margin-top: 14px;
    }

    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-sessions-list {
        max-height: none;
        gap: 10px;
    }

    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-variant {
        padding: 12px;
    }

    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-variant-name {
        font-size: 15px;
    }

    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-variant-meta {
        font-size: 13px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .uc-season-tooltip.uc-tooltip-mobile .uc-tooltip-cta {
        margin-top: 16px;
        padding: 14px;
        font-size: 15px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .uc-season-month-header span {
        font-size: 11px;
        padding: 6px 2px;
    }

    .uc-season-event-label {
        font-size: 10px;
    }
}

.uc-season-nav-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 8px;
}

.uc-season-nav-wrap > .uc-season-months-row {
    grid-column: 2 / 3;
    grid-row: 1;
    min-width: 0;
}

.uc-season-nav-wrap > .uc-season-nav-arrow.uc-season-nav-prev {
    grid-column: 1 / 2;
    grid-row: 1;
    justify-self: center;
}

.uc-season-nav-wrap > .uc-season-nav-arrow.uc-season-nav-next {
    grid-column: 3 / 4;
    grid-row: 1;
    justify-self: center;
}

@media (max-width: 1024px) {
    .uc-season-nav-wrap {
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        row-gap: 16px;
        align-items: start;
    }

    .uc-season-nav-wrap > .uc-season-months-row {
        grid-column: 1 / -1 !important;
        grid-row: 1 !important;
    }

    .uc-season-nav-wrap > .uc-season-nav-arrow.uc-season-nav-prev {
        grid-column: 1 / 2 !important;
        grid-row: 2 !important;
        justify-self: start !important;
    }

    .uc-season-nav-wrap > .uc-season-nav-arrow.uc-season-nav-next {
        grid-column: 2 / 3 !important;
        grid-row: 2 !important;
        justify-self: end !important;
    }
}

.uc-season-nav-arrow {
    font-size: 32px;
    line-height: 1;
    color: #17AC4B;
    cursor: pointer;
    user-select: none;
    padding: 0 4px;
    transition: opacity .15s ease, transform .15s ease;
}

.uc-season-nav-arrow:hover,
.uc-season-nav-arrow:focus {
    opacity: 0.7;
    outline: none;
}

.uc-season-nav-arrow.is-loading {
    opacity: 0.4;
    pointer-events: none;
}

.uc-season-event-bar.uc-season-event-past {
    opacity: 0.35;
    filter: grayscale(0.8);
    cursor: pointer;
}
