/* Responsive Floating Enquiry & Brochure Component CSS */

/* Desktop: form starts open, so hide the side tab until the form is closed */
@media (min-width: 992px) {
    .floating-enquiry-btn {
        display: none !important;
    }

    body.enquire-drawer-closed .floating-enquiry-btn {
        display: flex !important;
    }
}

.enquire-drawer-overlay {
    position: fixed;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    left: auto;
    bottom: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 999990;
    opacity: 1;
    visibility: visible;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.enquire-drawer-overlay.mode-brochure {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    transform: none;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    justify-content: flex-start;
    align-items: center;
    padding: 20px 24px;
    pointer-events: auto;
    z-index: 999995;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.enquire-drawer-overlay.mode-brochure.active {
    opacity: 1;
    visibility: visible;
}

.enquire-drawer-container {
    position: relative;
    width: 340px;
    max-width: 88vw;
    background: #ffffff;
    z-index: 999999;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
    pointer-events: auto;
    border: 1px solid rgba(184, 144, 71, 0.35);
}

.enquire-drawer-overlay.mode-brochure .enquire-drawer-container {
    transform: translateX(calc(-100% - 40px));
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.3);
    border: none;
}

.enquire-drawer-overlay.mode-brochure.active .enquire-drawer-container {
    transform: translateX(0);
    opacity: 1;
}

.enquire-drawer-container.minimized {
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    pointer-events: none;
}

.enquire-drawer-header {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #ffffff;
    padding: 11px 16px;
    position: relative;
    border-bottom: 2px solid #b89047;
    user-select: none;
}

.enquire-drawer-close {
    position: absolute;
    top: 9px;
    right: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.enquire-drawer-close:hover {
    background: #ee3425;
    color: #ffffff;
    transform: rotate(90deg);
}

.enquire-drawer-badge {
    display: none;
}

.enquire-drawer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.enquire-drawer-subtitle {
    display: none;
}

.enquire-drawer-body {
    padding: 14px 16px;
    flex: 1;
    overflow-y: auto;
}

.enquire-drawer-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.enquire-drawer-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.enquire-drawer-group label {
    display: none;
}

.enquire-drawer-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.enquire-drawer-input-wrap i.icon {
    position: absolute;
    left: 10px;
    color: #b89047;
    font-size: 12px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.enquire-drawer-input-wrap input,
.enquire-drawer-input-wrap textarea {
    width: 100%;
    padding: 7px 10px 7px 32px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #1f2937;
    background: #f9fafb;
    transition: all 0.2s ease;
    outline: none;
}

.enquire-drawer-input-wrap textarea {
    padding-top: 7px;
    resize: vertical;
    min-height: 48px;
}

.enquire-drawer-input-wrap input:focus,
.enquire-drawer-input-wrap textarea:focus {
    border-color: #b89047;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(184, 144, 71, 0.15);
}

.enquire-drawer-submit-btn {
    margin-top: 4px;
    background: linear-gradient(135deg, #b89047 0%, #ee3425 100%);
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(238, 52, 37, 0.2);
    transition: all 0.3s ease;
}

.enquire-drawer-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238, 52, 37, 0.35);
    background: linear-gradient(135deg, #a37c35 0%, #d82b1d 100%);
}

.enquire-drawer-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.enquire-drawer-success {
    text-align: center;
    padding: 24px 14px;
}

.enquire-drawer-success i {
    font-size: 40px;
    color: #22c55e;
    margin-bottom: 12px;
}

.enquire-drawer-success h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.enquire-drawer-success p {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

/* --- Mobile Responsive Mode (max-width: 991px) --- */
@media (max-width: 991px) {
    /* Show Enquire Now floating button on mobile screens */
    .floating-enquiry-btn {
        display: flex !important;
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 999989;
    }

    body.enquire-drawer-open .floating-enquiry-btn {
        display: none !important;
    }

    /* Convert default overlay on mobile into a centered popup modal on click */
    .enquire-drawer-overlay:not(.mode-brochure) {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        justify-content: center;
        align-items: center;
        padding: 16px;
        pointer-events: auto;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease, visibility 0.35s ease;
    }

    .enquire-drawer-overlay:not(.mode-brochure).active {
        opacity: 1;
        visibility: visible;
    }

    .enquire-drawer-overlay:not(.mode-brochure) .enquire-drawer-container {
        width: 340px;
        max-width: 90vw;
        transform: scale(0.9);
        opacity: 0;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
        margin: auto;
        border: none;
    }

    .enquire-drawer-overlay:not(.mode-brochure).active .enquire-drawer-container {
        transform: scale(1);
        opacity: 1;
    }
}
