/* === Quick Enquiry Modal Styles === */

/* Base overlay */
.qe-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.qe-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Backdrop blur */
.qe-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 16, 7, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Modal container */
.qe-container {
    position: relative;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid rgba(249, 168, 38, 0.2);
    border-radius: 20px;
    padding: 40px;
    box-shadow:
        0 20px 50px rgba(28, 16, 7, 0.15),
        0 0 0 1px rgba(249, 168, 38, 0.05);
    transform: translateY(30px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

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

.qe-container::-webkit-scrollbar {
    width: 4px;
}

.qe-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* Close Button */
.qe-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(249, 168, 38, 0.3);
    border-radius: 50%;
    background: rgba(249, 168, 38, 0.05);
    color: #EB1400;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.qe-close:hover {
    background: #EB1400;
    color: #ffffff;
    transform: rotate(90deg);
}

/* Header */
.qe-header {
    margin-bottom: 28px;
    text-align: left;
}

.qe-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #EB1400;
    background: rgba(249, 168, 38, 0.08);
    border: 1px solid rgba(249, 168, 38, 0.2);
    border-radius: 50px;
    padding: 4px 12px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.qe-title {
    font-size: 28px;
    font-weight: 700;
    color: #1c1007;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.qe-subtitle {
    font-size: 14px;
    color: #666666;
    margin: 0;
    line-height: 1.5;
}

/* Form layouts */
.qe-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qe-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 520px) {
    .qe-row {
        grid-template-columns: 1fr;
    }
}

/* Field styling */
.qe-field {
    position: relative;
    text-align: left;
}

.qe-input {
    width: 100%;
    background: #fafafa;
    border: 1.5px solid #eaeaea;
    border-radius: 10px;
    color: #1c1007;
    font-size: 14px;
    padding: 20px 14px 6px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.qe-input::placeholder {
    color: transparent;
}

.qe-input:focus {
    border-color: #EB1400;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(249, 168, 38, 0.1);
}

.qe-input.is-invalid {
    border-color: #ff5a5a;
    box-shadow: 0 0 0 3px rgba(255, 90, 90, 0.1);
}

/* Floating labels */
.qe-label {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #888888;
    font-size: 13.5px;
    pointer-events: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.qe-input:focus~.qe-label,
.qe-input:not(:placeholder-shown)~.qe-label {
    top: 8px;
    transform: translateY(0);
    font-size: 10px;
    color: #EB1400;
    font-weight: 600;
}

/* Textarea fix */
.qe-textarea {
    min-height: 80px;
    resize: vertical;
}

.qe-textarea~.qe-label {
    top: 20px;
    transform: none;
}

.qe-textarea:focus~.qe-label,
.qe-textarea:not(:placeholder-shown)~.qe-label {
    top: 8px;
}

/* Special always-up label for select dropdowns */
.qe-label-select {
    top: 8px !important;
    transform: none !important;
    font-size: 10px !important;
    color: #888888;
    font-weight: 600;
}

.qe-select {
    padding-top: 22px;
    padding-bottom: 6px;
    cursor: pointer;
}

.qe-select option {
    background: #ffffff;
    color: #1c1007;
}

/* Error message styles */
.qe-error {
    display: block;
    font-size: 11px;
    color: #ff5a5a;
    margin-top: 4px;
    min-height: 15px;
    padding-left: 2px;
}

/* Submit Button */
.qe-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #EB1400 0%, #E07B24 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(249, 168, 38, 0.2);
}

.qe-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(249, 168, 38, 0.3);
}

.qe-submit:active {
    transform: translateY(0);
}

.qe-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success layout */
.qe-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0 10px;
    animation: qeFadeIn 0.3s ease;
}

.qe-success[hidden] {
    display: none;
}

.qe-success-icon {
    margin-bottom: 16px;
}

.qe-success-title {
    font-size: 24px;
    font-weight: 700;
    color: #1c1007;
    margin: 0 0 8px;
}

.qe-success-msg {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto 20px;
}

.qe-success-close {
    background: transparent;
    border: 1.5px solid #EB1400;
    color: #EB1400;
    border-radius: 50px;
    padding: 8px 24px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qe-success-close:hover {
    background: rgba(249, 168, 38, 0.08);
}

@keyframes qeFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes qePop {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}