/* ==========================================================================
   Appointment Modal Popup Styling (am- namespace)
   ========================================================================== */

/* ── Global Floating Booking Button (FAB) ────────────────────────────────── */
.am-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background-color: #0f6b3f;
    /* theme primary green */
    color: #fff;
    border: 1px solid #1a6640;
    border-radius: 40px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 107, 63, 0.25);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    box-sizing: border-box;
}

.am-fab:hover {
    background-color: #f4a51c;
    /* theme secondary gold on hover */
    border-color: #f4a51c;
    box-shadow: 0 10px 28px rgba(244, 165, 28, 0.35);
    transform: translateY(-3px);
}

.am-fab:active {
    transform: translateY(-1px);
}

.am-fab-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.am-fab-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.am-fab-text {
    line-height: 1;
}

/* Responsive adjustment for FAB on small screens */
@media (max-width: 580px) {
    .am-fab {
        bottom: 20px;
        right: 20px;
        padding: 0;
        width: 46px;
        height: 46px;
        border-radius: 50%;
    }

    .am-fab-text {
        display: none;
    }

    .am-fab-icon {
        width: 20px;
        height: 20px;
        margin: 0;
    }
}

.am-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.am-modal-wrapper.is-open {
    display: flex;
    pointer-events: auto;
}

/* Background Overlay blur */
.am-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 35, 23, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 100;
}

.am-modal-wrapper.is-open .am-overlay {
    opacity: 1;
}

/* Modal Card scale transitions */
.am-card {
    position: relative;
    background-color: #fff;
    border-radius: 16px;
    border: 1px solid #EAE3D6;
    width: min(520px, calc(100% - 32px));
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 28px 24px;
    z-index: 101;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.am-modal-wrapper.is-open .am-card {
    opacity: 1;
    transform: scale(1);
}

/* Hide scrollbar for standard styles inside card */
.am-card::-webkit-scrollbar {
    width: 5px;
}

.am-card::-webkit-scrollbar-track {
    background: #FAF8F5;
}

.am-card::-webkit-scrollbar-thumb {
    background: #c49e4f;
    border-radius: 4px;
}

/* Close button positioning & hover rotate */
.am-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    background: #FAF8F5;
    border: 1px solid #EAE3D6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a6e62;
    cursor: pointer;
    transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
    z-index: 120;
    padding: 0;
}

.am-close-btn:hover {
    transform: rotate(90deg);
    background-color: #1a6640;
    color: #fff;
    border-color: #1a6640;
}

.am-close-btn svg {
    width: 14px;
    height: 14px;
}

/* Modal Content spacing */
.am-content {
    display: flex;
    flex-direction: column;
}

/* Header */
.am-form-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 1.5px solid #F6F3ED;
    padding-bottom: 14px;
    margin-bottom: 20px;
}

.am-form-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #FAF8F5;
    border: 1.5px solid rgba(196, 158, 79, 0.25);
    color: #1a6640;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.am-form-header-icon svg {
    width: 22px;
    height: 22px;
}

.am-form-header-text h3 {
    font-family: 'Georgia', serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a2e22;
    margin: 0 0 2px;
}

.am-form-header-text p {
    font-size: 12px;
    color: #66796d;
    margin: 0;
}

/* Form Styles */
.am-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.am-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.am-form-group label {
    font-size: 11px;
    font-weight: 700;
    color: #1f2b24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.am-input-wrapper {
    position: relative;
    width: 100%;
}

.am-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #5a8264;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}

.am-input-icon svg {
    width: 15px;
    height: 15px;
}

.am-input-icon--textarea {
    top: 18px;
    transform: none;
}

.am-form input[type="text"],
.am-form input[type="tel"],
.am-form input[type="date"],
.am-form select,
.am-form textarea {
    width: 100%;
    padding: 10px 12px 10px 36px;
    font-size: 13px;
    color: #1f2b24;
    background-color: #fff;
    border: 1px solid #EAE3D6;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.am-form input::placeholder,
.am-form textarea::placeholder {
    color: #a0b0a5;
    opacity: 1;
}

.am-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a6640' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.am-form input:focus,
.am-form select:focus,
.am-form textarea:focus {
    border-color: #1a6640;
    box-shadow: 0 0 0 3px rgba(26, 102, 100, 0.08);
}

.am-form textarea {
    resize: none;
}

/* Info Alert strip */
.am-info-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #F6F8F3;
    border: 1px solid #E1E8DC;
    border-radius: 8px;
    padding: 10px 14px;
}

.am-info-alert-icon {
    color: #1a6640;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.am-info-alert-icon svg {
    width: 16px;
    height: 16px;
}

.am-info-alert-text strong {
    font-size: 11px;
    font-weight: 700;
    color: #1a2e22;
    display: block;
    margin-bottom: 2px;
}

.am-info-alert-text p {
    font-size: 11px;
    color: #5a6e62;
    margin: 0;
    line-height: 1.35;
}

/* Submit Button */
.am-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #1a4028;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 64, 40, 0.15);
}

.am-submit-btn:hover {
    background-color: #12301c;
    transform: translateY(-2px);
}

.am-btn-icon {
    width: 16px;
    height: 16px;
}

.am-btn-arrow {
    font-weight: 700;
    transition: transform 0.3s ease;
}

.am-submit-btn:hover .am-btn-arrow {
    transform: translateX(4px);
}

/* Privacy Note */
.am-privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 10.5px;
    color: #66796d;
    text-align: center;
    margin-top: 4px;
}

.am-lock-icon {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* Scroll lock utility */
body.am-no-scroll {
    overflow: hidden;
    padding-right: 0px;
    /* offset scrollbar layout shifts */
}

/* Responsive constraints */
@media (max-width: 580px) {
    .am-card {
        padding: 24px 20px;
    }

    .am-form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .am-form-header-text h3 {
        font-size: 18px;
    }
}