/* ═══════════════════════════════════════════════════
   Berry Season Calendar — Frontend Styles
   ═══════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────── */
.bsc-wrapper {
    --bsc-green-dark:    #1b5e20;
    --bsc-green:         #2e7d32;
    --bsc-green-light:   #81c784;
    --bsc-orange:        #e65100;
    --bsc-orange-light:  #fff3e0;
    --bsc-gray:          #9e9e9e;
    --bsc-gray-light:    #f5f5f5;
    --bsc-white:         #ffffff;
    --bsc-bg:            #f4fbe7;
    --bsc-shadow-sm:     0 2px 12px rgba(30,80,30,.07);
    --bsc-shadow-md:     0 6px 28px rgba(30,80,30,.13);
    --bsc-radius:        18px;
    --bsc-transition:    .3s cubic-bezier(.4,0,.2,1);
    --bsc-font:          inherit;

    font-family: var(--bsc-font);
    box-sizing: border-box;
}
.bsc-wrapper *, .bsc-wrapper *::before, .bsc-wrapper *::after {
    box-sizing: inherit;
}

/* ── Section Header ─────────────────────────────────── */
.bsc-header {
    text-align: center;
    padding: 8px 20px 40px;
}
.bsc-section-title {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #1a2e1a;
    margin: 0 0 10px;
    letter-spacing: -.025em;
    line-height: 1.2;
}
.bsc-section-subtitle {
    font-size: 1rem;
    color: #5a6a5a;
    margin: 0;
    font-weight: 400;
}

/* ── Timeline Container ─────────────────────────────── */
.bsc-timeline-container {
    overflow-x: auto;
    overflow-y: visible;
    padding: 20px 30px 48px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c8e6c9 transparent;
}
.bsc-timeline-container::-webkit-scrollbar {
    height: 5px;
}
.bsc-timeline-container::-webkit-scrollbar-thumb {
    background: #c8e6c9;
    border-radius: 4px;
}

/* ── Items Row ──────────────────────────────────────── */
.bsc-items-row {
    display: flex;
    align-items: flex-start;
    min-width: max-content;
    gap: 0;
    position: relative;
}

/* Horizontal baseline */
.bsc-items-row::before {
    content: '';
    position: absolute;
    left: 60px;
    right: 60px;
    top: 105px;
    height: 2px;
    background: linear-gradient(90deg, #c8e6c9, #a5d6a7, #c8e6c9);
    border-radius: 2px;
    z-index: 0;
    pointer-events: none;
}

/* ── Single Item ────────────────────────────────────── */
.bsc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 260px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* ── Node (Image Circle) ────────────────────────────── */
.bsc-node {
    position: relative;
    width: 210px;
    height: 210px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

/* Outer decorative ring */
.bsc-node-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--berry-color, #C62828), transparent 60%) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: .35;
    transition: opacity var(--bsc-transition);
}
.bsc-item:hover .bsc-node-ring {
    opacity: .65;
}

/* Image wrapper */
.bsc-node-image {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #e8f5e9;
    border: 4px solid #e0e0e0;
    transition:
        border-color var(--bsc-transition),
        transform var(--bsc-transition),
        box-shadow var(--bsc-transition);
}
.bsc-node-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bsc-node-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* Status: active */
.bsc-status-active .bsc-node-image {
    border-color: var(--berry-color, #43a047);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--berry-color, #43a047) 18%, transparent);
}
/* Fallback for browsers without color-mix */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
    .bsc-status-active .bsc-node-image {
        box-shadow: 0 0 0 4px rgba(67,160,71,.22);
    }
}

/* Status: upcoming */
.bsc-status-upcoming .bsc-node-image {
    border-color: #ff9800;
    border-width: 3px;
}

/* Status: past */
.bsc-status-past .bsc-node-image {
    border-color: #e0e0e0;
    filter: grayscale(55%);
    opacity: .6;
}

/* Hover lift */
.bsc-item:hover .bsc-node-image {
    transform: translateY(-4px) scale(1.04);
    box-shadow: var(--bsc-shadow-md);
}
.bsc-status-past:hover .bsc-node-image {
    transform: translateY(-2px);
}

/* Pulse ring for active */
.bsc-node-pulse {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 3px solid var(--berry-color, #43a047);
    animation: bsc-pulse 2.2s ease-out infinite;
    z-index: 1;
}
@keyframes bsc-pulse {
    0%   { opacity: .7; transform: scale(1) }
    70%  { opacity: 0;  transform: scale(1.3) }
    100% { opacity: 0;  transform: scale(1.3) }
}

/* ── Info Card ──────────────────────────────────────── */
.bsc-card {
    background: var(--bsc-white);
    border-radius: var(--bsc-radius);
    padding: 14px 16px 16px;
    width: 100%;
    text-align: center;
    box-shadow: var(--bsc-shadow-sm);
    border-top: 3.5px solid transparent;
    transition:
        transform var(--bsc-transition),
        box-shadow var(--bsc-transition);
    min-height: 120px;
}
.bsc-item:hover .bsc-card {
    transform: translateY(-3px);
    box-shadow: var(--bsc-shadow-md);
}
.bsc-status-active   .bsc-card { border-top-color: var(--berry-color, #43a047) }
.bsc-status-upcoming .bsc-card { border-top-color: #ff9800 }
.bsc-status-past     .bsc-card { border-top-color: #e0e0e0 }

/* ── Status Badge ───────────────────────────────────── */
.bsc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    line-height: 1;
    white-space: nowrap;
}
.bsc-badge-active {
    background: #e8f5e9;
    color: var(--bsc-green);
}
.bsc-badge-upcoming {
    background: var(--bsc-orange-light);
    color: var(--bsc-orange);
}
.bsc-badge-past {
    background: var(--bsc-gray-light);
    color: var(--bsc-gray);
}

/* Live dot for "active" badge */
.bsc-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bsc-green);
    animation: bsc-blink 1.6s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes bsc-blink {
    0%, 100% { opacity: 1 }
    50%       { opacity: .25 }
}

/* ── Card Typography ────────────────────────────────── */
.bsc-berry-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2e1a;
    margin: 0 0 5px;
    line-height: 1.25;
}
.bsc-status-past .bsc-berry-title { color: var(--bsc-gray) }

.bsc-berry-desc {
    font-size: .8rem;
    color: #708070;
    margin: 0 0 8px;
    line-height: 1.45;
}

.bsc-dates {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: .78rem;
    color: #8a9a8a;
    margin-top: 4px;
    flex-wrap: wrap;
}
.bsc-dates-icon { font-size: .85rem; flex-shrink: 0 }

/* ── Arrow Connector ────────────────────────────────── */
.bsc-connector {
    position: absolute;
    top: 95px;
    right: -20px;
    width: 40px;
    height: 20px;
    color: #b0c4b0;
    z-index: 3;
    pointer-events: none;
    flex-shrink: 0;
}
.bsc-connector svg {
    width: 100%;
    height: 100%;
}

/* ═══════════════════════════════════════════════════
   GRID LAYOUT
   ═══════════════════════════════════════════════════ */
.bsc-layout-grid .bsc-timeline-container {
    overflow-x: visible;
    padding: 0 10px 30px;
}
.bsc-layout-grid .bsc-items-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 28px;
    min-width: auto;
}
.bsc-layout-grid .bsc-items-row::before { display: none }
.bsc-layout-grid .bsc-item  { width: auto }
.bsc-layout-grid .bsc-connector { display: none }

/* ═══════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════ */
.bsc-empty {
    text-align: center;
    color: var(--bsc-gray);
    padding: 60px 20px;
    font-style: italic;
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

/* Tablet: smaller items */
@media (max-width: 900px) {
    .bsc-item { width: 210px }
    .bsc-node { width: 160px; height: 160px }
    .bsc-connector { top: 70px }
    .bsc-items-row::before { top: 80px }
}

/* Mobile: grid layout for timeline too */
@media (max-width: 540px) {
    .bsc-wrapper { --bsc-radius: 14px }
    .bsc-timeline-container { padding: 0 16px 32px }

    /* Switch timeline to 2-col grid on mobile */
    .bsc-layout-timeline .bsc-items-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        min-width: auto;
    }
    .bsc-layout-timeline .bsc-items-row::before { display: none }
    .bsc-layout-timeline .bsc-item { width: auto }
    .bsc-layout-timeline .bsc-connector { display: none }

    .bsc-layout-grid .bsc-items-row {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .bsc-node  { width: 80px; height: 80px; margin-bottom: 14px }
    .bsc-card  { padding: 12px 12px 14px }
    .bsc-badge { font-size: .63rem; padding: 3px 8px }
    .bsc-berry-title { font-size: .9rem }
    .bsc-section-title { font-size: 1.4rem }
}
