/* --- QWJ Modal Styles --- */
.qwj-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px); /* Modern frosted glass effect */
    z-index: 99999; /* Must be higher than sticky footer */
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Mobile first: aligns to bottom */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.qwj-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.qwj-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0; /* Bottom sheet style on mobile */
    padding: 25px 20px;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.qwj-modal-overlay.active .qwj-modal-container {
    transform: translateY(0);
}

.qwj-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.qwj-modal-close:hover {
    color: #333;
}

.qwj-modal-body {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    margin-top: 10px;
}

.qwj-modal-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 2px solid #c86c2e; /* Brand Orange */
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.qwj-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Stacks buttons with a gap */
}

.qwj-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    gap: 10px;
    transition: transform 0.2s, background 0.2s;
}

/* Call Button (Primary Action) */
.qwj-btn-call {
    background-color: #c86c2e;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(200, 108, 46, 0.3);
}

.qwj-btn-call:hover {
    background-color: #b05c24;
    transform: translateY(-2px);
    color: #ffffff;
}

/* Form Button (Secondary Action) */
.qwj-btn-form {
    background-color: #f0f7ff;
    color: #1b3b5a;
    border: 2px solid #1b3b5a;
}

.qwj-btn-form:hover {
    background-color: #e1edf8;
    transform: translateY(-2px);
    color: #1b3b5a;
}

/* Desktop Media Query */
@media (min-width: 600px) {
    .qwj-modal-overlay {
        align-items: center; /* Center vertically on desktop */
    }

    .qwj-modal-container {
        border-radius: 20px; /* Fully rounded on desktop */
        transform: scale(0.9);
    }

    .qwj-modal-overlay.active .qwj-modal-container {
        transform: scale(1); /* Pop-in effect instead of slide up */
    }
}