/* ================================================================
   CruiseFlow Upcoming Events Shortcode
   ================================================================ */

.cf-upcoming {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 16px;
    color: #E8EDF5;
}

.cf-upcoming-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 32px 0;
    letter-spacing: -0.01em;
}

.cf-upcoming-loading,
.cf-upcoming-empty {
    color: #8899AA;
    font-size: 0.95rem;
    padding: 32px 0;
}

.cf-upcoming-carousel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
}

.cf-upcoming-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cf-upcoming-viewport::-webkit-scrollbar {
    display: none;
}

.cf-upcoming-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 48px) / 3);
    gap: 24px;
}

.cf-upcoming-nav {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(201, 168, 76, 0.2);
    background: rgba(10, 14, 26, 0.88);
    color: #E8EDF5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.cf-upcoming-nav:hover:not(:disabled) {
    border-color: rgba(201, 168, 76, 0.45);
    background: rgba(201, 168, 76, 0.12);
    transform: translateY(-1px);
}

.cf-upcoming-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.cf-event-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(201, 168, 76, 0.2);
    display: flex;
    flex-direction: column;
    min-width: 0;
    scroll-snap-align: start;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    backdrop-filter: blur(4px);
}

.cf-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 168, 76, 0.35);
    border-color: rgba(201, 168, 76, 0.45);
}

.cf-event-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0D1F35;
    overflow: hidden;
}

.cf-event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

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

.cf-event-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0D1F35 0%, #0a1929 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-event-card-image-placeholder::after {
    content: '\1F6A2';
    font-size: 2.5rem;
    opacity: 0.25;
}

.cf-event-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.cf-event-badge--available {
    background: rgba(0, 212, 255, 0.15);
    color: #00D4FF;
    border: 1px solid rgba(0, 212, 255, 0.35);
}

.cf-event-badge--filling-fast {
    background: rgba(201, 168, 76, 0.15);
    color: #E8C97A;
    border: 1px solid rgba(201, 168, 76, 0.4);
}

.cf-event-badge--sold-out {
    background: rgba(180, 28, 28, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(180, 28, 28, 0.45);
}

.cf-event-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cf-event-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cf-event-date {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #C9A84C;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.25);
    padding: 3px 10px;
    border-radius: 9999px;
}

.cf-event-time {
    font-size: 0.82rem;
    color: #8899AA;
}

.cf-event-name {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 4px 0;
    line-height: 1.35;
}

.cf-event-boat {
    font-size: 0.82rem;
    color: #8899AA;
    margin: 0 0 18px 0;
}

.cf-event-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(201, 168, 76, 0.12);
}

.cf-event-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #E8C97A;
}

.cf-event-price small {
    font-size: 0.73rem;
    font-weight: 400;
    color: #8899AA;
}

.cf-event-book-btn {
    display: inline-block;
    background: linear-gradient(135deg, #0099BB 0%, #00D4FF 100%);
    color: #0A0E1A !important;
    text-decoration: none !important;
    padding: 9px 22px;
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 4px 18px rgba(0, 212, 255, 0.25);
}

.cf-event-book-btn:hover {
    box-shadow: 0 6px 28px rgba(0, 212, 255, 0.45);
    transform: translateY(-2px);
    opacity: 0.92;
}

.cf-event-sold-out {
    font-size: 0.82rem;
    color: #fca5a5;
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (max-width: 980px) {
    .cf-upcoming-grid {
        grid-auto-columns: calc((100% - 24px) / 2);
    }
}

@media (max-width: 640px) {
    .cf-upcoming-carousel {
        grid-template-columns: 1fr;
    }

    .cf-upcoming-nav {
        display: none;
    }

    .cf-upcoming-grid {
        grid-auto-columns: 100%;
    }

    .cf-event-card-body {
        padding: 16px;
    }
}


.cf-event-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cf-event-details-btn {
    display: inline-block;
    background: transparent;
    color: #E8EDF5;
    border: 1px solid rgba(201, 168, 76, 0.3);
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.cf-event-details-btn:hover {
    border-color: rgba(201, 168, 76, 0.55);
    background: rgba(201, 168, 76, 0.1);
    transform: translateY(-2px);
}

.cf-upcoming-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cf-upcoming-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 10, 18, 0.82);
    backdrop-filter: blur(8px);
}

.cf-upcoming-modal-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: min(88vh, 900px);
    overflow: auto;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(10, 14, 26, 0.98));
    border: 1px solid rgba(201, 168, 76, 0.28);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.cf-upcoming-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(9, 14, 24, 0.82);
    color: #E8EDF5;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.cf-upcoming-modal-media img,
.cf-upcoming-modal-placeholder {
    width: 100%;
    height: 280px;
    display: block;
    object-fit: cover;
}

.cf-upcoming-modal-placeholder {
    background: linear-gradient(135deg, #0D1F35 0%, #0a1929 100%);
}

.cf-upcoming-modal-content {
    padding: 24px;
}

.cf-upcoming-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.cf-upcoming-modal-meta span,
.cf-upcoming-modal-facts div {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
}

.cf-upcoming-modal-content h3 {
    font-family: 'Playfair Display', 'Georgia', serif;
    color: #FFFFFF;
    margin: 0 0 6px 0;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.cf-upcoming-modal-subtitle {
    margin: 0 0 18px 0;
    color: #8899AA;
}

.cf-upcoming-modal-section + .cf-upcoming-modal-section {
    margin-top: 20px;
}

.cf-upcoming-modal-section h4 {
    margin: 0 0 10px 0;
    color: #E8C97A;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cf-upcoming-modal-section p,
.cf-upcoming-modal-note {
    color: #E8EDF5;
}

.cf-upcoming-modal-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.cf-upcoming-modal-facts strong,
.cf-upcoming-modal-facts span {
    display: block;
}

.cf-upcoming-modal-facts strong {
    margin-bottom: 4px;
    color: #E8C97A;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cf-upcoming-modal-note {
    margin-top: 12px;
}

.cf-upcoming-modal-actions {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
}

body.cf-upcoming-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .cf-event-actions,
    .cf-upcoming-modal-actions {
        width: 100%;
        justify-content: stretch;
    }

    .cf-event-details-btn,
    .cf-event-book-btn,
    .cf-upcoming-modal-actions .cf-event-book-btn {
        width: 100%;
        text-align: center;
    }
}
