/* Payment Initiate Modal CSS - Enterprise Refactor */

body {
    font-family: var(--font-family-primary, 'Roboto', sans-serif);
    background-color: var(--background-primary, #f4f4f4);
    margin: 0;
    padding: 0;
}

.payment-card {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    background: var(--background-tertiary, #ffffff);
    border-radius: 12px;
    box-sizing: border-box;
}

.payment-card .logo {
    text-align: center;
    margin-bottom: 1rem;
}

.payment-card .logo img {
    max-width: 200px;
    max-height: 80px;
    object-fit: contain;
}

.payment-card h2 {
    font-size: 1.25rem;
    color: var(--text-main, #111);
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.payment-card > p {
    color: var(--text-muted, #666);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.details-compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.detail-box {
    background: var(--background-primary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 0.75rem;
}

.detail-box h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted, #6b7280);
    margin: 0 0 0.5rem 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    padding-bottom: 0.3rem;
}

.detail-box p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-main, #374151);
    padding: 0.85rem 0;
    border-bottom: 1px dashed var(--border-color, #e5e7eb);
}

.detail-box p:last-child {
    border-bottom: none;
}

.detail-box i {
    color: #9ca3af;
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.detail-box span {
    font-weight: 600;
    color: var(--text-main, #111);
    word-break: break-word;
    flex: 1;
    text-align: left;
}

.highlight {
    color: var(--brand-primary-color) !important;
    font-size: 1.05rem !important;
}

.payment-btn-container {
    margin-bottom: 1.25rem;
}

#rzp-button1 {
    width: 100%;
    padding: 0.8rem;
    color: var(--color-white, #fff);
    background-color: var(--brand-primary-color, #00B09B);
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
}

.timer-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.timer-message {
    color: #b45309;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.6rem 0;
}

#countdown {
    font-weight: 700;
    color: #d97706;
}

.progress-wrapper {
    height: 5px;
    background: #fef3c7;
    border-radius: 3px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    background: #f59e0b;
    width: 0%;
    transition: width 1s linear;
}

.payment-card footer {
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Small Screen Adjustments */
@media (max-width: 480px) {
    .payment-modal__box {
        padding: 16px; /* Exactly 1rem padding */
    }
    .payment-card h2 {
        font-size: 1.05rem;
        margin-bottom: 0.25rem;
    }
    .payment-card > p {
        display: none;
    }
    
    .details-compact-grid {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        margin-bottom: 0.75rem;
    }
    .detail-box {
        padding: 0.4rem 0.5rem;
        border-radius: 6px;
    }
    .detail-box h3 {
        font-size: 0.7rem;
        margin-bottom: 0.15rem;
        padding-bottom: 0.2rem;
    }
    .detail-box p {
        padding: 0.15rem 0;
        gap: 0.35rem;
    }
    .detail-box i {
        font-size: 0.8rem;
        width: 14px;
    }
    .detail-box span {
        font-size: 0.8rem;
    }
    .highlight {
        font-size: 0.9rem !important;
    }
    .payment-btn-container {
        margin-bottom: 0.5rem;
    }
    #rzp-button1 {
        padding: 0.65rem;
        font-size: 0.9rem;
    }
    .timer-card {
        padding: 0.4rem;
        margin-bottom: 0.5rem;
    }
    .timer-message {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
}

/* Core Modal Wrapper Styles (Required for HTMX visibility) */
.payment-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.payment-modal.show {
    display: flex;
    flex-direction: column;
}

.payment-modal__box {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.payment-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    color: #555;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.payment-modal__close:hover {
    color: #000;
}

.payment-modal__content {
    padding-top: 20px;
}