/**
 * TBC WooCommerce Calendar - Featured Events Styles
 * 
 * Styles for featured events section displayed above main calendar.
 * Matches main calendar date formatting and visual consistency.
 * Responsive design with mobile-first optimizations.
 */

/* ===== FEATURED EVENTS CONTAINER ===== */
.tbc-wc-featured-events-container {
    margin-bottom: 30px;
}

.tbc-wc-featured-events-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.tbc-wc-featured-events-list {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    /* No flex-wrap: shrink-to-fit across one row, scales with N featured products. */
}

/* ===== INDIVIDUAL FEATURED EVENT BOX ===== */
.tbc-wc-featured-event-box {
    flex: 1 1 0;
    min-width: 140px;
    max-width: 220px;
    text-align: center;
    background-color: var(--fcom-primary-bg, #ffffff);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--el-box-shadow, 0 4px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tbc-wc-featured-event-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--el-box-shadow-dark, 0 6px 12px rgba(0, 0, 0, 0.5));
}

.tbc-wc-featured-event-box a {
    display: block;
    text-decoration: none;
    color: var(--fcom-primary-text, #19283a);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tbc-wc-featured-event-box a:hover {
    color: var(--fcom-primary-text, #19283a);
}

/* ===== EVENT IMAGE SECTION ===== */
.tbc-wc-featured-event-image-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    overflow: hidden;
}

.tbc-wc-featured-event-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.tbc-wc-featured-event-box:hover .tbc-wc-featured-event-image {
    transform: scale(1.05);
}

/* ===== PRODUCT NAME SECTION ===== */
.tbc-wc-featured-event-name {
    font-size: 18px;
    height: 50px;
    margin: 10px 0;
    padding: 0 5px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 500;
    line-height: 1.3;
}

/* ===== DATE DISPLAY SECTION ===== */
.tbc-wc-featured-event-date-wrapper {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding-bottom: 15px;
    flex-shrink: 0;
}

.tbc-wc-featured-event-date {
    border: 2px solid var(--fcom-primary-border, #e3e8ee);
    border-radius: 8px;
    padding: 5px;
    box-shadow: var(--el-box-shadow-light, 0 2px 4px rgba(0, 0, 0, 0.1));
    background-color: var(--fcom-secondary-bg, #f0f2f5);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Date components */
.tbc-wc-event-day {
    display: block;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--fcom-primary-text, #19283a);
    margin-bottom: 2px;
}

.tbc-wc-event-date {
    display: block;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--fcom-primary-text, #19283a);
}

.tbc-wc-event-date sup {
    font-size: 10px;
    top: -0.5em;
}

.tbc-wc-event-month {
    display: block;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--fcom-primary-text, #19283a);
    margin-top: 2px;
}

/* ===== CALL-TO-ACTION BUTTON ===== */
.tbc-wc-read-more-button {
    border-top: 1px solid var(--fcom-primary-border, #e3e8ee);
    background-color: var(--fcom-primary-bg, #ffffff);
    color: var(--fcom-primary-text, #19283a);
    padding: 10px 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: auto;
    font-weight: 500;
}

.tbc-wc-featured-event-box a:hover .tbc-wc-read-more-button {
    background-color: var(--fcom-text-link, #2271b1);
    color: #ffffff;
}

/* ===== MOBILE-ONLY DATE LABELS =====
 * The day-of-week (above the image) and the short date (below the image)
 * are rendered by PHP unconditionally; hidden on desktop, revealed on mobile.
 */
.tbc-wc-featured-event-day-mobile,
.tbc-wc-featured-event-shortdate-mobile {
    display: none;
}

/* ===== RESPONSIVE MOBILE STYLES =====
 * On mobile we mirror the React Native FeaturedEvents widget:
 * day-of-week above a circular image, then "Jul 24th" below.
 * No card chrome, no title, no "Learn More" button. Cards shrink-to-fit
 * across one row, scaling with N featured events.
 */
@media (max-width: 767px) {
    /* Container adjustments */
    .tbc-wc-featured-events-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .tbc-wc-featured-events-list {
        gap: 8px;
        justify-content: center;
        align-items: flex-start;
    }

    /* Mobile event boxes - shrink-to-fit, scales with N, no card chrome */
    .tbc-wc-featured-event-box {
        flex: 1 1 0;
        min-width: 60px;
        max-width: 110px;
        background-color: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .tbc-wc-featured-event-box:hover {
        transform: none;
        box-shadow: none;
    }

    /* Hide title, CTA, and the desktop date-box on mobile */
    .tbc-wc-featured-event-name,
    .tbc-wc-read-more-button,
    .tbc-wc-featured-event-date-wrapper {
        display: none;
    }

    /* Reveal mobile-only date labels */
    .tbc-wc-featured-event-day-mobile,
    .tbc-wc-featured-event-shortdate-mobile {
        display: block;
        text-align: center;
        line-height: 1.1;
        color: var(--fcom-primary-text, #19283a);
    }

    .tbc-wc-featured-event-day-mobile {
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.3px;
        margin-bottom: 6px;
    }

    .tbc-wc-featured-event-shortdate-mobile {
        font-size: 12px;
        font-weight: 700;
        margin-top: 6px;
        letter-spacing: 0.3px;
    }

    .tbc-wc-featured-event-shortdate-mobile sup {
        font-size: 8px;
        top: -0.4em;
    }

    /* Image becomes a circle (1:1 with border-radius 50%) */
    .tbc-wc-featured-event-image-wrapper {
        padding-bottom: 100%;
        border-radius: 50%;
        border: 3px solid var(--fcom-primary-text, #19283a);
        box-sizing: border-box;
    }

    .tbc-wc-featured-event-box:hover .tbc-wc-featured-event-image {
        transform: none;
    }
}

/* No dark-mode shadow overrides needed — --el-box-shadow-* tokens auto-switch. */