/* ==========================================================================
   winter-events-table.css
   Chastain's Cottages - Visual Events Calendar & Winter Activities Tables
   Designed to layer cleanly over /assets/css/mainCC23.css and /assets/css/FAQs.css
   ========================================================================== */

.cc-events-wrap {
    clear: both;
    background: #ffffff;
    border: 1px solid #d6dce2;
    border-radius: 5px;
    box-shadow: 0 3px 12px rgba(44, 58, 71, 0.06);
    margin: 1.5em 0 2.5em 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.cc-events-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    font-size: 0.92em;
    line-height: 1.5;
    color: #3b444f;
}

/* Header row - blends with mainCC23.css slate (#3F5165) & ocean blue (#5f9dd2) */
table.cc-events-table thead {
    border-bottom: 3px solid #5f9dd2;
}

table.cc-events-table thead tr {
    background-color: #3F5165 !important;
    border: 0;
}

table.cc-events-table thead th {
    background-color: #3F5165;
    color: #ffffff !important;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.95em 0.9em;
    text-align: left;
    vertical-align: middle;
    line-height: 1.3;
}

/* Secondary "P.S." table header variation - echoes FAQs.css sea-glass (#5ba5a5) */
table.cc-events-table.cc-ps-table thead {
    border-bottom: 3px solid #5ba5a5;
}

table.cc-events-table.cc-ps-table thead tr,
table.cc-events-table.cc-ps-table thead th {
    background-color: #44525F !important;
}

/* Body rows - override mainCC23.css default odd/even striping for clean control */
table.cc-events-table tbody tr {
    background-color: #ffffff;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid #e4e8ec;
    transition: background-color 0.15s ease-in-out;
}

table.cc-events-table tbody tr:nth-child(2n + 1) {
    background-color: #ffffff;
}

table.cc-events-table tbody tr.cc-row-alt {
    background-color: #f8fafc;
}

table.cc-events-table tbody tr:hover {
    background-color: #f0f6fb;
}

table.cc-events-table tbody tr:last-child {
    border-bottom: 0;
}

table.cc-events-table td {
    padding: 0.9em 0.9em;
    vertical-align: top;
    font-weight: 400;
}

/* Column proportions on desktop */
table.cc-events-table th.cc-col-event,
table.cc-events-table td.cc-col-event {
    width: 23%;
}

table.cc-events-table th.cc-col-loc,
table.cc-events-table td.cc-col-loc {
    width: 22%;
}

table.cc-events-table th.cc-col-date,
table.cc-events-table td.cc-col-date {
    width: 21%;
}

table.cc-events-table th.cc-col-cost,
table.cc-events-table td.cc-col-cost {
    width: 22%;
}

table.cc-events-table th.cc-col-link,
table.cc-events-table td.cc-col-link {
    width: 12%;
    white-space: nowrap;
}

/* Seasonal divider bands inside the chronological calendar */
table.cc-events-table tbody tr.cc-season-band,
table.cc-events-table tbody tr.cc-season-band:hover {
    background-color: #edf2f5 !important;
    border-top: 1px solid #d5dde5;
    border-bottom: 1px solid #d5dde5;
}

table.cc-events-table tbody tr.cc-season-band td {
    padding: 0.65em 0.95em;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #3F5165;
    border-left: 4px solid #5f9dd2;
}

/* Typography helpers inside cells */
.cc-event-name {
    display: block;
    font-weight: 700;
    color: #283440;
    font-size: 1.02em;
    line-height: 1.35;
    margin-bottom: 0.2em;
}

.cc-event-sub {
    display: block;
    font-size: 0.88em;
    color: #68737e;
    line-height: 1.38;
}

.cc-date-main {
    display: block;
    font-weight: 700;
    color: #2f3c48;
    line-height: 1.38;
    margin-bottom: 0.18em;
}

.cc-annual-note {
    display: block;
    font-size: 0.86em;
    color: #68737e;
    line-height: 1.35;
}

/* Compact button-style link in the More Info column */
a.cc-event-link {
    display: inline-block;
    padding: 0.42em 0.78em;
    background-color: #f3f8fc;
    color: #3F5165 !important;
    border: 1px solid #b8d2ea;
    border-radius: 4px;
    font-size: 0.84em;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

a.cc-event-link:hover {
    background-color: #5f9dd2;
    border-color: #5f9dd2;
    color: #ffffff !important;
    text-decoration: none !important;
}

table.cc-events-table.cc-ps-table a.cc-event-link {
    background-color: #f3f8f8;
    border-color: #b4d6d6;
}

table.cc-events-table.cc-ps-table a.cc-event-link:hover {
    background-color: #5ba5a5;
    border-color: #5ba5a5;
    color: #ffffff !important;
}

/* Responsive stacked cards on mobile (matches mainCC23.css 736px breakpoint) */
@media screen and (max-width: 736px) {
    .cc-events-wrap {
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow-x: visible;
    }

    table.cc-events-table thead {
        display: none;
    }

    table.cc-events-table,
    table.cc-events-table tbody {
        display: block;
        width: 100%;
    }

    table.cc-events-table tbody tr {
        display: block;
        background: #ffffff !important;
        border: 1px solid #d6dce2;
        border-radius: 5px;
        margin-bottom: 1em;
        padding: 0.25em 0;
        box-shadow: 0 2px 6px rgba(44, 58, 71, 0.05);
    }

    table.cc-events-table tbody tr.cc-season-band {
        background: #edf2f5 !important;
        border-radius: 4px;
        margin: 1.25em 0 0.75em 0;
        padding: 0;
    }

    table.cc-events-table tbody tr.cc-season-band td {
        display: block;
        width: 100% !important;
        padding: 0.7em 0.9em;
    }

    table.cc-events-table tbody tr.cc-season-band td:before {
        content: none;
    }

    table.cc-events-table td,
    table.cc-events-table td.cc-col-event,
    table.cc-events-table td.cc-col-loc,
    table.cc-events-table td.cc-col-date,
    table.cc-events-table td.cc-col-cost,
    table.cc-events-table td.cc-col-link {
        display: block;
        width: 100% !important;
        white-space: normal;
        padding: 0.5em 1em;
        border-bottom: 1px solid #f0f2f5;
    }

    table.cc-events-table td:last-child {
        border-bottom: 0;
        padding-top: 0.65em;
        padding-bottom: 0.75em;
    }

    table.cc-events-table td:before {
        content: attr(data-label);
        display: block;
        font-size: 0.74em;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #68737e;
        margin-bottom: 0.2em;
    }

    table.cc-events-table td.cc-col-event:before {
        content: none;
    }
}
