/* ============================================
   OSAC v2 - Hold Timer Popups
   Design: Premium Resort Series
   ============================================ */

/* ----------------------------------------
   OVERLAY
   ---------------------------------------- */
.osac-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    animation: osac-fade-in 0.2s ease-out;
}

@keyframes osac-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ----------------------------------------
   MODAL BASE
   ---------------------------------------- */
.osac-modal {
    background: #ffffff;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: osac-slide-up 0.25s ease-out;
    overflow: hidden;
}

@keyframes osac-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------
   HEADER
   ---------------------------------------- */
.osac-modal__header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 2px solid #D6A85B;
    background: #fffcf7;
}

.osac-modal__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.osac-modal__icon svg {
    width: 100%;
    height: 100%;
}

.osac-modal__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    letter-spacing: -0.01em;
}

/* ----------------------------------------
   BODY
   ---------------------------------------- */
.osac-modal__body {
    padding: 24px;
}

.osac-modal__subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 16px;
}

/* Timer Display */
.osac-modal__timer {
    text-align: center;
    padding: 16px;
    border: 1.5px solid #D6A85B;
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 16px;
}

.osac-modal__timer-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    color: #1f2937;
    letter-spacing: 0.05em;
}

/* Notice Box (Info/Warning) */
.osac-modal__notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.osac-modal__notice-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.osac-modal__notice-icon svg {
    width: 100%;
    height: 100%;
}

.osac-modal__notice-text {
    color: #57534e;
}

/* ----------------------------------------
   FOOTER (Buttons)
   ---------------------------------------- */
.osac-modal__footer {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.osac-modal__footer-row {
    display: flex;
    gap: 10px;
}

.osac-modal__footer-row .osac-modal__btn {
    flex: 1;
}

/* Buttons */
.osac-modal__btn {
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    border: none;
}

/* Primary Button (Gold) */
.osac-modal__btn--primary {
    background: linear-gradient(135deg, #D6A85B 0%, #c49a4d 100%);
    color: #ffffff;
    width: 100%;
    order: -1;
}

.osac-modal__btn--primary:hover {
    background: linear-gradient(135deg, #c49a4d 0%, #b38d42 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(214, 168, 91, 0.3);
}

/* Secondary Button (Outline) */
.osac-modal__btn--secondary {
    background: #ffffff;
    color: #374151;
    border: 1.5px solid #e5e7eb;
}

.osac-modal__btn--secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Full-width button (for single-action modals) */
.osac-modal__btn--full {
    width: 100%;
    box-sizing: border-box;
}

/* ============================================
   POPUP A: WARNING (Extensions Available)
   Gold/Beige Theme
   ============================================ */
.osac-modal--warning .osac-modal__header {
    background: #fffcf7;
    border-bottom-color: #D6A85B;
}

.osac-modal--warning .osac-modal__icon svg {
    stroke: #D6A85B;
}

.osac-modal--warning .osac-modal__timer {
    border-color: #D6A85B;
}

.osac-modal--warning .osac-modal__notice {
    background: #FFF8E8;
    border: 1px solid #f5e6d3;
}

.osac-modal--warning .osac-modal__notice-icon svg {
    stroke: #D6A85B;
}

/* Last Extension Warning (slightly more attention) */
.osac-modal--warning.osac-modal--last-chance .osac-modal__notice {
    background: #FEF3E2;
    border-color: #f5dbb8;
}

/* ============================================
   POPUP B: FINAL (No Extensions Left)
   Soft-Red Theme
   ============================================ */
.osac-modal--final .osac-modal__header {
    background: #fffafa;
    border-bottom-color: rgba(216, 106, 106, 0.5);
}

.osac-modal--final .osac-modal__icon svg {
    stroke: #D86A6A;
}

.osac-modal--final .osac-modal__timer {
    border-color: #F4D7D7;
}

.osac-modal--final .osac-modal__timer-value {
    color: #C45C5C;
}

.osac-modal--final .osac-modal__notice {
    background: #FFF5F5;
    border: 1px solid #F4D7D7;
}

.osac-modal--final .osac-modal__notice-icon svg {
    stroke: #D86A6A;
}

.osac-modal--final .osac-modal__notice-text {
    color: #9a4c4c;
}

/* ============================================
   POPUP: EXPIRED
   Neutral/Gray Theme
   ============================================ */
.osac-modal--expired .osac-modal__header {
    background: #f9fafb;
    border-bottom-color: #d1d5db;
}

.osac-modal--expired .osac-modal__icon svg {
    stroke: #9ca3af;
}

.osac-modal--expired .osac-modal__timer {
    border-color: #e5e7eb;
}

.osac-modal--expired .osac-modal__timer-value {
    color: #9ca3af;
}

.osac-modal--expired .osac-modal__notice {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

/* ============================================
   EXTENSION TOAST (Small notification)
   ============================================ */
.osac-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #ffffff;
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-left: 4px solid #10b981;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99998;
    animation: osac-toast-in 0.3s ease-out;
    max-width: 320px;
}

@keyframes osac-toast-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.osac-toast--closing {
    animation: osac-toast-out 0.2s ease-in forwards;
}

@keyframes osac-toast-out {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

.osac-toast__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.osac-toast__icon svg {
    width: 100%;
    height: 100%;
    stroke: #10b981;
}

.osac-toast__content {
    flex: 1;
}

.osac-toast__title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
    margin: 0 0 2px;
}

.osac-toast__text {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
}

/* ============================================
   TIMER HEADER BUTTON
   ============================================ */
.osac-hold-timer-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.osac-hold-timer__extend {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.osac-hold-timer__extend:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.osac-hold-timer__extend:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .osac-modal {
        max-width: 100%;
        margin: 10px;
        border-radius: 10px;
    }

    .osac-modal__header {
        padding: 20px 20px 14px;
    }

    .osac-modal__body {
        padding: 20px;
    }

    .osac-modal__footer {
        padding: 0 20px 20px;
    }

    .osac-modal__timer-value {
        font-size: 2rem;
    }

    .osac-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

/* ===========================================
   API ERROR POPUP & BOOKING LIMIT POPUP
   =========================================== */
.osac-api-error-overlay,
.osac-booking-limit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    padding: 20px;
    animation: osac-fade-in 0.2s ease-out;
}

.osac-api-error-popup,
.osac-booking-limit-popup {
    background: #ffffff;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: osac-slide-up 0.25s ease-out;
    padding: 24px;
    text-align: center;
}

.osac-api-error-popup .osac-popup-icon--warning {
    color: var(--osb-warning, #ca8a04);
}

.osac-api-error-message {
    color: var(--osb-text-main, #374151);
    line-height: 1.6;
}

.osac-popup-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.osac-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--osb-surface, #f9fafb);
    border: 1px solid var(--osb-border, #e5e7eb);
    border-radius: var(--osb-radius-md, 8px);
    color: var(--osb-text-main, #374151);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.osac-contact-link:hover {
    background: var(--osb-border-light, #f3f4f6);
    border-color: var(--osb-brand-primary, #d4a574);
    color: var(--osb-brand-primary, #d4a574);
}

.osac-contact-whatsapp {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

.osac-contact-whatsapp:hover {
    background: #128c7e;
    border-color: #128c7e;
    color: #fff;
}

.osac-contact-whatsapp svg {
    fill: #fff;
}

/* API Error Popup - Buttons */
.osac-popup-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.osac-popup-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.osac-popup-btn--primary {
    background: linear-gradient(135deg, #D6A85B 0%, #c49a4d 100%);
    color: #ffffff;
}

.osac-popup-btn--primary:hover {
    background: linear-gradient(135deg, #c49a4d 0%, #b38d42 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(214, 168, 91, 0.3);
}

.osac-popup-btn--secondary {
    background: #ffffff;
    color: #374151;
    border: 1.5px solid #e5e7eb;
}

.osac-popup-btn--secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}