/* ==========================================================================
   AVPMS TOURS — ENQUIRY & CAPTURE MODALS STYLES
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 14, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay.is-active .modal-container {
    transform: scale(1) translateY(0);
}

/* Modal close button */
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--body-bg);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close-btn:hover {
    background-color: var(--accent-light);
    color: var(--accent-color);
    transform: rotate(90deg);
}

.modal-close-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* 1. HEADER SECTION */
.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--card-border);
    background-color: var(--primary-light);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* 2. BODY CONTENT (SCROLLABLE FORM) */
.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

@media (max-width: 600px) {
    .modal-form-grid {
        grid-template-columns: 1fr;
    }
}

.modal-form-span-2 {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .modal-form-span-2 {
        grid-column: span 1;
    }
}

/* 3. INVOICE VOUCHER RECEIPT */
.receipt-wrapper {
    display: none;
    padding: 1.5rem;
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius-md);
    background-color: var(--body-bg);
    margin-bottom: 1.5rem;
    font-family: monospace;
}

.receipt-header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 1rem;
}

.receipt-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
}

.receipt-ref {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: bold;
    margin-top: 0.25rem;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    word-break: break-all;
}

.receipt-divider {
    border-top: 1px dashed var(--card-border);
    margin: 1rem 0;
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
}

/* Success confirmation block */
.submission-success-view {
    text-align: center;
    padding: 2rem 1.5rem;
    display: none;
}

.success-icon-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: hsl(122, 39%, 49%, 0.1);
    color: hsl(122, 39%, 49%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.success-icon-container svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Modal Actions footer */
.modal-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    background-color: var(--body-bg);
}
