/* =========================
   MODAL
========================= */

.appointment-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    .appointment-modal.active {
        display: flex;
    }

/* =========================
   OVERLAY
========================= */

.appointment-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 18, 20, .28);
    backdrop-filter: blur(4px);
}

/* =========================
   BOX
========================= */

.appointment-modal-box {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0,0,0,.12);
    animation: modalIn .12s ease-out;
}

/* =========================
   ANIMATION
========================= */

@keyframes modalIn {

    from {
        opacity: 0;
        transform: translateY(10px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================
   HEADER
========================= */

.appointment-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

    .appointment-modal-header h3 {
        font-size: 24px;
        font-weight: 700;
        color: var(--verde-escuro);
        line-height: 1;
        margin-bottom: 4px;
    }

    .appointment-modal-header span {
        font-size: 12px;
        color: rgba(0,0,0,.55);
    }

/* =========================
   CLOSE
========================= */

.appointment-modal-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: rgba(0,0,0,.05);
    color: var(--verde-escuro);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: .18s;
}

    .appointment-modal-close:hover {
        background: var(--amarelo);
        color: var(--verde-escuro);
    }

/* =========================
   FORM
========================= */

.appointment-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =========================
   FIELD
========================= */

.appointment-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

    .appointment-field label {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .3px;
        color: var(--verde-escuro);
    }

    /* =========================
   INPUTS
========================= */

    .appointment-field input,
    .appointment-field select,
    .appointment-field textarea {
        width: 100%;
        border: 1px solid rgba(0,0,0,.08);
        border-radius: 10px;
        background: rgba(0,0,0,.02);
        color: var(--verde-escuro);
        font-size: 13px;
        font-weight: 500;
        transition: .18s;
    }

    .appointment-field input,
    .appointment-field select {
        height: 40px;
        padding: 0 12px;
    }

    .appointment-field textarea {
        min-height: 92px;
        padding: 12px;
        resize: vertical;
        line-height: 1.45;
        font-family: 'Inter', sans-serif;
    }

        /* =========================
   FOCUS
========================= */

        .appointment-field input:focus,
        .appointment-field select:focus,
        .appointment-field textarea:focus {
            outline: none;
            border-color: var(--verde-medio);
            box-shadow: 0 0 0 3px rgba(86,195,202,.10);
        }

/* =========================
   STATUS
========================= */

.status-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-option {
    flex: 1;
    min-width: 110px;
}

    .status-option input {
        display: none;
    }

    .status-option span {
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
        transition: .18s;
        border: 1px solid rgba(0,0,0,.06);
        background: rgba(0,0,0,.03);
        color: rgba(0,0,0,.65);
    }

    .status-option input:checked + span {
        border-color: transparent;
        color: white;
    }

    .status-option.agendado input:checked + span {
        background: #00757c;
    }

    .status-option.confirmado input:checked + span {
        background: #4f9b58;
    }

    .status-option.cancelado input:checked + span {
        background: #b24a12;
    }

/* =========================
   ACTIONS
========================= */

.appointment-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

/* =========================
   BUTTONS
========================= */

.btn-clear,
.btn-save {
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: .18s;
}

.btn-clear {
    background: rgba(0,0,0,.05);
    color: rgba(0,0,0,.65);
}

    .btn-clear:hover {
        background: rgba(0,0,0,.08);
    }

.btn-save {
    background: var(--verde-escuro);
    color: white;
}

    .btn-save:hover {
        background: var(--amarelo);
        color: var(--verde-escuro);
        transform: translateY(-1px);
    }

/* =========================
   SCROLLBAR
========================= */

.appointment-modal-box::-webkit-scrollbar {
    width: 8px;
}

.appointment-modal-box::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.14);
    border-radius: 20px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .appointment-modal {
        padding: 14px;
    }

    .appointment-modal-box {
        padding: 18px;
        border-radius: 16px;
    }

    .appointment-modal-header h3 {
        font-size: 21px;
    }

    .appointment-actions {
        flex-direction: column;
    }

    .btn-clear,
    .btn-save {
        width: 100%;
    }
}
