/* Site popup modal */
.letsboat-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
}

.letsboat-popup {
    background: #fff;
    padding: 0;
    text-align: center;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    top: -100vh;
    opacity: 0;
    transition: top 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease-out;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.letsboat-popup.show {
    top: 0;
    opacity: 1;
}

.letsboat-popup h2 {
    font-family: var(--lb-font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 400;
    color: var(--lb-deep);
    line-height: 1.2;
    margin: 0;
    padding: 2rem 3rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.letsboat-popup__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 1.75rem;
    color: var(--lb-deep);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.letsboat-popup__close:hover {
    background: #f0f0f0;
    transform: rotate(90deg) scale(1.1);
}

.popup-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 3rem;
    margin-bottom: 0;
    border-bottom: 2px solid #f0f0f0;
    background: #fff;
}

.popup-tab {
    background: none;
    border: none;
    padding: 1rem 2rem;
    font-family: var(--lb-font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-tab:hover {
    color: var(--lb-deep);
    background: #f8f9fa;
}

.popup-tab.active {
    color: var(--lb-deep);
    border-bottom-color: var(--lb-deep);
}

.popup-tab-content {
    display: none;
    padding: 2rem 3rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.popup-tab-content.active {
    display: block;
}

.popup-intro {
    font-family: var(--lb-font-sans);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    margin: 0 0 2rem;
    color: var(--lb-deep);
    text-align: center;
}

.popup-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: left;
}

.popup-info-section {
    display: flex;
    flex-direction: column;
}

.popup-info-section h3 {
    font-family: var(--lb-font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--lb-deep);
    margin: 0 0 1rem;
    line-height: 1.2;
}

.popup-prizes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-prizes li {
    font-family: var(--lb-font-sans);
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.prize-date {
    font-weight: 600;
    color: var(--lb-deep);
    min-width: 70px;
    flex-shrink: 0;
}

.prize-text {
    flex: 1;
}

.prize-final {
    color: #d4af37;
    font-weight: 700;
}

.popup-steps {
    font-family: var(--lb-font-sans);
    font-size: 0.9rem;
    line-height: 1.8;
    color: #333;
    margin: 0;
    padding-left: 1.5rem;
}

.popup-steps li {
    margin-bottom: 0.75rem;
}

.tally-form-container {
    width: 100%;
    min-height: 500px;
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 1rem;
}

.tally-form-container iframe {
    border: none;
    width: 100%;
    min-height: 500px;
    border-radius: 8px;
    background: #fff;
}

.letsboat-popup-reopen {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    padding: 10px 14px;
    border-radius: 9999px;
    border: none;
    background: #2f3b99;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .letsboat-popup-overlay {
        padding: 0.5rem;
    }

    .letsboat-popup {
        max-height: 95vh;
        border-radius: 12px;
    }

    .letsboat-popup h2 {
        padding: 1.5rem 1.5rem 1rem;
        font-size: 1.5rem;
    }

    .letsboat-popup__close {
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
        font-size: 1.5rem;
    }

    .popup-tabs {
        padding: 0 1rem;
    }

    .popup-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .popup-tab-content {
        padding: 1.5rem;
    }

    .popup-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .popup-intro {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .popup-info-section h3 {
        font-size: 1.25rem;
    }

    .popup-prizes li {
        font-size: 0.85rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    .prize-date {
        min-width: auto;
    }

    .popup-steps {
        font-size: 0.85rem;
        padding-left: 1.25rem;
    }

    .tally-form-container {
        min-height: 400px;
        max-height: 50vh;
        padding: 0.5rem;
    }

    .tally-form-container iframe {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .letsboat-popup h2 {
        padding: 1.25rem 1rem 0.75rem;
        font-size: 1.25rem;
    }

    .popup-tabs {
        padding: 0 0.75rem;
    }

    .popup-tab {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
    }

    .popup-tab-content {
        padding: 1rem;
    }
}
