/* =============================================================
   Enquiry Popup Modal — modal.css (Dark Navy Theme)
   Theme: Dark navy (#1a1a30) + Green (#1cb85a) matching site
   ============================================================= */

/* ---- Overlay ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ---- Modal Box ---- */
.modal-box {
    background: #1a1a30;
    border: 1px solid rgba(28, 184, 90, 0.25);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 640px;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    color: #ffffff;
}

.modal-overlay.is-visible .modal-box {
    transform: translateY(0) scale(1);
}

/* Green top accent bar */
.modal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1cb85a, #14e86a);
    border-radius: 20px 20px 0 0;
}

/* ---- Close Button ---- */
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(28, 184, 90, 0.2);
    border-color: #1cb85a;
    color: #ffffff;
    transform: rotate(90deg);
}

/* ---- Header ---- */
.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-badge {
    display: inline-block;
    background: rgba(28, 184, 90, 0.15);
    border: 1px solid rgba(28, 184, 90, 0.4);
    color: #1cb85a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 15px;
    border-radius: 50px;
    margin-bottom: 15px;
}

.modal-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.modal-title span {
    color: #1cb85a;
}

.modal-header p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 10px;
}

/* ---- Form ---- */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-field {
    position: relative;
}

.modal-field input,
.modal-field select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.25s;
}

.modal-field input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.modal-field input:focus,
.modal-field select:focus {
    border-color: #1cb85a;
    background: rgba(28, 184, 90, 0.05);
    box-shadow: 0 0 0 4px rgba(28, 184, 90, 0.1);
}

.modal-field select {
    appearance: none;
    cursor: pointer;
}

.modal-field select option {
    background: #1a1a30;
}

.modal-field.is-select::after {
    content: '▾';
    position: absolute;
    right: 18px;
    top: 52%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* ---- Captcha ---- */
.modal-captcha {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    margin: 5px 0;
}

.captcha-check {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    background: transparent;
}

.captcha-check.is-checked {
    background: #1cb85a;
    border-color: #1cb85a;
}

.captcha-check.is-checked::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.captcha-label {
    flex: 1;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.captcha-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
}

.captcha-branding svg {
    width: 26px;
    height: 26px;
}

.captcha-branding span {
    font-size: 0.55rem;
    color: #fff;
    line-height: 1;
}

/* ---- Submit Button ---- */
.modal-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1cb85a, #109645);
    border: none;
    border-radius: 60px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(28, 184, 90, 0.3);
    transition: all 0.3s;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(28, 184, 90, 0.4);
    filter: brightness(1.1);
}

.modal-btn:active {
    transform: translateY(0);
}

/* ---- Scrollbar ---- */
.modal-box::-webkit-scrollbar {
    width: 5px;
}

.modal-box::-webkit-scrollbar-track {
    background: transparent;
}

.modal-box::-webkit-scrollbar-thumb {
    background: rgba(28, 184, 90, 0.3);
    border-radius: 10px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .modal-box {
        padding: 35px 26px;
        border-radius: 18px;
        max-width: 95vw;
        margin: 20px;
    }

    .modal-close {
        top: 14px;
        right: 14px;
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .modal-header {
        margin-bottom: 25px;
    }

    .modal-title {
        font-size: clamp(1.3rem, 3.5vw, 1.6rem);
    }

    .modal-header p {
        font-size: 0.9rem;
        margin-top: 8px;
    }

    .modal-badge {
        font-size: 0.7rem;
        padding: 4px 12px;
        margin-bottom: 12px;
    }

    .modal-form {
        gap: 13px;
    }

    .modal-row {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .modal-field input,
    .modal-field select {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .modal-captcha {
        padding: 10px 14px;
        gap: 12px;
        margin: 3px 0;
    }

    .captcha-check {
        width: 22px;
        height: 22px;
    }

    .captcha-label {
        font-size: 0.85rem;
    }

    .modal-btn {
        padding: 14px;
        font-size: 1rem;
    }
}

@media (max-width: 540px) {
    .modal-box {
        padding: 28px 18px;
        border-radius: 16px;
        max-width: 100%;
        margin: 15px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .modal-header {
        margin-bottom: 20px;
    }

    .modal-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
        margin-bottom: 10px;
    }

    .modal-title {
        font-size: clamp(1.1rem, 2.5vw, 1.4rem);
        line-height: 1.3;
    }

    .modal-header p {
        font-size: 0.85rem;
        margin-top: 6px;
    }

    .modal-form {
        gap: 11px;
    }

    .modal-row {
        gap: 11px;
    }

    .modal-field input,
    .modal-field select {
        padding: 11px 14px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .modal-field.is-select::after {
        right: 14px;
    }

    .modal-captcha {
        padding: 9px 12px;
        gap: 10px;
        border-radius: 8px;
    }

    .captcha-check {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .captcha-label {
        font-size: 0.8rem;
    }

    .captcha-branding svg {
        width: 22px;
        height: 22px;
    }

    .captcha-branding span {
        font-size: 0.5rem;
    }

    .modal-btn {
        padding: 12px;
        font-size: 0.9rem;
        margin-top: 3px;
        letter-spacing: 0.5px;
    }

    .modal-box::-webkit-scrollbar {
        width: 4px;
    }
}
