/* ==========================================================================
   BeachSpoke Events Hub — Frontend Styles
   Palette: Navy #1B3A5C | Teal #3A8C96 | Sand #D4C5A9 | Cream #F5F2ED
   Fonts: Spectral (serif), Commissioner (sans-serif) — loaded by theme
   ========================================================================== */

:root {
    --bseh-navy: #1B3A5C;
    --bseh-teal: #3A8C96;
    --bseh-sand: #D4C5A9;
    --bseh-cream: #F5F2ED;
    --bseh-white: #ffffff;
    --bseh-text: #2c2c2c;
    --bseh-text-light: #5a6670;
    --bseh-border: #e0dbd4;
    --bseh-radius: 8px;
    --bseh-shadow: 0 2px 12px rgba(27, 58, 92, 0.08);
    --bseh-font-serif: 'Spectral', Georgia, 'Times New Roman', serif;
    --bseh-font-sans: 'Commissioner', 'Helvetica Neue', Arial, sans-serif;
}

/* Header / Controls */
.bseh-events-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: var(--bseh-font-sans);
    color: var(--bseh-text);
}

.bseh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bseh-sand);
}

.bseh-view-toggle {
    display: flex;
    gap: 0;
    border: 2px solid var(--bseh-navy);
    border-radius: var(--bseh-radius);
    overflow: hidden;
}

.bseh-toggle-btn {
    padding: 10px 20px;
    border: none;
    background: var(--bseh-white);
    color: var(--bseh-navy);
    font-family: var(--bseh-font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bseh-toggle-btn.active {
    background: var(--bseh-navy);
    color: var(--bseh-white);
}

.bseh-toggle-btn:hover:not(.active) {
    background: var(--bseh-cream);
}

.bseh-category-filter {
    padding: 10px 16px;
    border: 2px solid var(--bseh-border);
    border-radius: var(--bseh-radius);
    font-family: var(--bseh-font-sans);
    font-size: 14px;
    color: var(--bseh-navy);
    background: var(--bseh-white);
    min-width: 200px;
    cursor: pointer;
}

.bseh-category-filter:focus {
    border-color: var(--bseh-teal);
    outline: none;
}

/* ========================
   Calendar View
   ======================== */
.bseh-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bseh-month-title {
    font-family: var(--bseh-font-serif);
    font-size: 28px;
    font-weight: 600;
    color: var(--bseh-navy);
    margin: 0;
}

.bseh-nav-btn {
    padding: 8px 20px;
    border: 2px solid var(--bseh-navy);
    border-radius: var(--bseh-radius);
    background: var(--bseh-white);
    color: var(--bseh-navy);
    font-family: var(--bseh-font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bseh-nav-btn:hover {
    background: var(--bseh-navy);
    color: var(--bseh-white);
}

.bseh-calendar-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: var(--bseh-white);
    border-radius: var(--bseh-radius);
    overflow: hidden;
    box-shadow: var(--bseh-shadow);
}

.bseh-calendar-grid thead th {
    background: var(--bseh-navy);
    color: var(--bseh-white);
    padding: 14px 8px;
    text-align: center;
    font-family: var(--bseh-font-sans);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bseh-calendar-grid td {
    border: 1px solid var(--bseh-border);
    padding: 8px;
    vertical-align: top;
    min-height: 100px;
    height: 120px;
    position: relative;
}

.bseh-calendar-grid td.bseh-empty {
    background: #f9f8f6;
}

.bseh-day-number {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--bseh-text-light);
    margin-bottom: 4px;
}

.bseh-today .bseh-day-number {
    background: var(--bseh-teal);
    color: var(--bseh-white);
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
}

.bseh-has-events {
    background: rgba(58, 140, 150, 0.04);
}

.bseh-day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bseh-day-event-link {
    display: block;
    padding: 2px 6px;
    background: var(--bseh-teal);
    color: var(--bseh-white) !important;
    font-size: 11px;
    line-height: 1.3;
    border-radius: 3px;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s;
}

.bseh-day-event-link:hover {
    background: var(--bseh-navy);
}

.bseh-more-events {
    font-size: 11px;
    color: var(--bseh-teal);
    font-weight: 600;
    padding: 2px 0;
}

/* ========================
   List View
   ======================== */
.bseh-list-container {
    max-width: 1200px;
}

.bseh-no-events {
    text-align: center;
    padding: 60px 20px;
    background: var(--bseh-cream);
    border-radius: var(--bseh-radius);
}

.bseh-no-events p {
    font-family: var(--bseh-font-serif);
    font-size: 18px;
    color: var(--bseh-text-light);
}

.bseh-month-group {
    margin-bottom: 40px;
}

.bseh-month-header {
    font-family: var(--bseh-font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--bseh-navy);
    padding-bottom: 12px;
    border-bottom: 3px solid var(--bseh-sand);
    margin-bottom: 20px;
}

.bseh-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* Event Card */
.bseh-event-card {
    background: var(--bseh-white);
    border-radius: var(--bseh-radius);
    box-shadow: var(--bseh-shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.bseh-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(27, 58, 92, 0.12);
}

.bseh-card-image {
    height: 180px;
    overflow: hidden;
}

.bseh-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.bseh-event-card:hover .bseh-card-image img {
    transform: scale(1.05);
}

.bseh-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bseh-card-date {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.bseh-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bseh-navy);
    color: var(--bseh-white);
    border-radius: 6px;
    padding: 6px 12px;
    min-width: 50px;
}

.bseh-date-month {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.bseh-date-day {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.bseh-date-time {
    font-size: 14px;
    color: var(--bseh-text-light);
}

.bseh-card-title {
    font-family: var(--bseh-font-serif);
    font-size: 20px;
    margin: 0 0 8px;
    line-height: 1.3;
}

.bseh-card-title a {
    color: var(--bseh-navy) !important;
    text-decoration: none !important;
}

.bseh-card-title a:hover {
    color: var(--bseh-teal) !important;
}

.bseh-card-location {
    font-size: 14px;
    color: var(--bseh-text-light);
    margin: 0 0 10px;
}

.bseh-card-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: var(--bseh-text);
    margin: 0 0 12px;
}

.bseh-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.bseh-category-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bseh-cream);
    color: var(--bseh-navy);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.bseh-card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--bseh-border);
}

.bseh-card-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    font-size: 13px;
}

.bseh-contact-name {
    font-weight: 600;
    color: var(--bseh-navy);
}

.bseh-contact-link {
    color: var(--bseh-teal) !important;
    text-decoration: none !important;
}

.bseh-contact-link:hover {
    text-decoration: underline !important;
}

.bseh-card-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.bseh-btn {
    display: inline-block;
    padding: 8px 18px;
    font-family: var(--bseh-font-sans);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--bseh-radius);
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-align: center;
}

.bseh-btn-details {
    background: var(--bseh-navy);
    color: var(--bseh-white) !important;
}

.bseh-btn-details:hover {
    background: var(--bseh-teal);
}

.bseh-btn-external {
    background: transparent;
    color: var(--bseh-teal) !important;
    border-color: var(--bseh-teal);
}

.bseh-btn-external:hover {
    background: var(--bseh-teal);
    color: var(--bseh-white) !important;
}

.bseh-btn-full {
    display: block;
    width: 100%;
}

/* Load More */
.bseh-load-more-wrap {
    text-align: center;
    margin-top: 30px;
}

.bseh-load-more-btn {
    padding: 14px 40px;
    background: var(--bseh-white);
    color: var(--bseh-navy);
    border: 2px solid var(--bseh-navy);
    border-radius: var(--bseh-radius);
    font-family: var(--bseh-font-sans);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bseh-load-more-btn:hover {
    background: var(--bseh-navy);
    color: var(--bseh-white);
}

.bseh-load-more-btn.loading {
    opacity: 0.6;
    cursor: wait;
}

/* ========================
   Single Event Page
   ======================== */
.bseh-single-event {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: var(--bseh-font-sans);
}

.bseh-single-header {
    margin-bottom: 30px;
}

.bseh-single-image {
    border-radius: var(--bseh-radius);
    overflow: hidden;
    margin-bottom: 24px;
    max-height: 400px;
}

.bseh-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bseh-single-title {
    font-family: var(--bseh-font-serif);
    font-size: 36px;
    color: var(--bseh-navy);
    margin: 0 0 12px;
    line-height: 1.2;
}

.bseh-single-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bseh-single-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-bottom: 40px;
}

.bseh-single-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--bseh-text);
}

.bseh-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bseh-detail-block {
    background: var(--bseh-cream);
    border-radius: var(--bseh-radius);
    padding: 20px;
}

.bseh-detail-block h4 {
    font-family: var(--bseh-font-sans);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bseh-teal);
    margin: 0 0 8px;
    font-weight: 700;
}

.bseh-detail-block p {
    margin: 4px 0;
    font-size: 15px;
    color: var(--bseh-navy);
}

.bseh-detail-block a {
    color: var(--bseh-teal) !important;
    text-decoration: none !important;
}

.bseh-detail-block a:hover {
    text-decoration: underline !important;
}

.bseh-single-nav {
    padding-top: 30px;
    border-top: 2px solid var(--bseh-sand);
}

/* ========================
   Submission Form
   ======================== */
.bseh-submit-wrap {
    max-width: 700px;
    margin: 0 auto;
}

.bseh-submit-form {
    background: var(--bseh-white);
    border-radius: var(--bseh-radius);
    box-shadow: var(--bseh-shadow);
    padding: 40px;
}

.bseh-form-title {
    font-family: var(--bseh-font-serif);
    font-size: 28px;
    color: var(--bseh-navy);
    margin: 0 0 8px;
}

.bseh-form-subtitle {
    color: var(--bseh-text-light);
    font-size: 15px;
    margin: 0 0 30px;
}

.bseh-form-row {
    margin-bottom: 20px;
}

.bseh-form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bseh-navy);
}

.bseh-form-row label .required {
    color: #c0392b;
}

.bseh-form-row input[type="text"],
.bseh-form-row input[type="email"],
.bseh-form-row input[type="tel"],
.bseh-form-row input[type="url"],
.bseh-form-row input[type="datetime-local"],
.bseh-form-row input[type="file"],
.bseh-form-row textarea,
.bseh-form-row select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--bseh-border);
    border-radius: var(--bseh-radius);
    font-family: var(--bseh-font-sans);
    font-size: 15px;
    color: var(--bseh-text);
    background: var(--bseh-white);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.bseh-form-row input:focus,
.bseh-form-row textarea:focus,
.bseh-form-row select:focus {
    border-color: var(--bseh-teal);
    outline: none;
}

.bseh-form-row textarea {
    min-height: 120px;
    resize: vertical;
}

.bseh-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.bseh-form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--bseh-navy);
    margin: 30px 0 16px;
    padding-top: 20px;
    border-top: 1px solid var(--bseh-border);
}

.bseh-submit-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--bseh-teal);
    color: var(--bseh-white);
    border: none;
    border-radius: var(--bseh-radius);
    font-family: var(--bseh-font-sans);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 30px;
}

.bseh-submit-btn:hover {
    background: var(--bseh-navy);
}

.bseh-form-message {
    padding: 16px 20px;
    border-radius: var(--bseh-radius);
    margin-bottom: 20px;
    font-size: 15px;
}

.bseh-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bseh-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Honeypot — hidden from users */
.bseh-hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 768px) {
    .bseh-header {
        flex-direction: column;
        align-items: stretch;
    }

    .bseh-view-toggle {
        width: 100%;
    }

    .bseh-toggle-btn {
        flex: 1;
        justify-content: center;
    }

    .bseh-category-filter {
        width: 100%;
        min-width: auto;
    }

    .bseh-events-grid {
        grid-template-columns: 1fr;
    }

    .bseh-calendar-grid td {
        height: auto;
        min-height: 60px;
        padding: 4px;
    }

    .bseh-day-events {
        display: none;
    }

    .bseh-has-events .bseh-day-number::after {
        content: '';
        display: block;
        width: 6px;
        height: 6px;
        background: var(--bseh-teal);
        border-radius: 50%;
        margin: 4px auto 0;
    }

    .bseh-month-title {
        font-size: 20px;
    }

    .bseh-nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .bseh-single-body {
        grid-template-columns: 1fr;
    }

    .bseh-single-title {
        font-size: 26px;
    }

    .bseh-form-columns {
        grid-template-columns: 1fr;
    }

    .bseh-submit-form {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .bseh-calendar-grid thead th {
        font-size: 10px;
        padding: 8px 2px;
    }

    .bseh-card-content {
        padding: 16px;
    }
}
