/* Overlay para modal */
.modal-agendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal centralizado */
.modal-agendar {
    background: var(--secondary);
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 95vw;
    max-width: 355px;
    max-height: 93vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    animation: modalIn 0.2s;
    transition: max-width 0.3s cubic-bezier(0.4, 1.3, 0.6, 1),
        width 0.3s cubic-bezier(0.4, 1.3, 0.6, 1);
    margin: 40px 0;
    height: auto;
}

.modal-agendar.expanded {
    max-width: 750px;
    width: 95vw;
}

.modal-content-flex {
    display: flex;
    flex-direction: row;
    gap: 32px;
    min-height: 340px;
}
.modal-col-esq {
    min-width: 260px;
    max-width: 320px;
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
}

.modal-col-esq h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--muted-foreground);
    margin-top: 15px;
}

.modal-col-dir h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--muted-foreground);
    margin-top: 0px;
}

.modal-col-dir {
    min-width: 220px;
    width: 100%;
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@keyframes modalIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}
.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-foreground);
    margin: 0;
}

.modal-divisor {
    margin: 15px 0;
    width: 100%;
    border: 1px solid var(--border);
}
.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}
.modal-body {
    flex: 1;
    overflow-y: auto;
    margin-top: 8px;
}

/* Responsivo para tablets */
@media (max-width: 650px) {
    .modal-agendar {
        max-width: 90vw;
        padding: 16px;
        margin: 24px 0;
        height: auto;
        max-height: 90vh;
        border-radius: 10px;
        position: static;
    }

    .modal-agendar.expanded {
        flex-direction: column;
        max-width: 90vw;
    }
    .modal-content-flex {
        flex-direction: column;
        gap: 0;
    }
    .modal-col-dir,
    .modal-col-esq {
        max-width: 100vw;
        min-width: 0;
    }

    .modal-col-esq h2 {
        font-size: 20px;
        font-weight: 700;
        color: var(--muted-foreground);
        margin-top: 15px;
    }
    .modal-col-dir h2 {
        font-size: 18px;
        margin-top: 20px;
    }
}

/* Responsivo para mobile */
@media (max-width: 510px) {
    .modal-agendar {
        max-width: 98vw;
        padding: 12px;
        margin: 24px 0;
        height: auto;
        max-height: 90vh;
        border-radius: 10px;
        position: static;
    }

    .modal-agendar.expanded {
        max-width: 98vw;
        flex-direction: column;
        height: auto;
        max-height: 90vh;
        border-radius: 10px;
        position: static;
    }
    .modal-content-flex {
        flex-direction: column;
        gap: 0;
    }
    .modal-col-dir,
    .modal-col-esq {
        max-width: 100vw;
        min-width: 0;
    }

    .modal-col-esq h2 {
        font-size: 18px;
        margin-top: 10px;
    }

    .modal-col-dir h2 {
        font-size: 18px;
        margin-top: 20px;
    }
    .card-barbeiro img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        cursor: pointer;
    }
}

@media (max-width: 400px) {
    .card-barbeiro.selected h3 {
        font-size: 14px;
    }

    .card-barbeiro h3 {
        font-size: 14px;
    }

    .lista-barbeiros {
        gap: 15px;
    }
}

/* Logout Modal Customizations */
.logout-modal {
    max-width: 350px;
    padding: 0;
}

.logout-modal .form-container {
    width: 100%;
    max-width: 350px;
    padding: 20px;
    position: relative;
}

.logout-modal .modal-header {
    margin-bottom: 20px;
    justify-content: space-between;
    align-items: center;
}

.logout-modal h2 {
    text-align: center;
    margin: 0;
    font-weight: 700;
    font-size: 24px;
    line-height: 30px;
    width: 100%;
}

.logout-text {
    text-align: center;
    color: var(--muted-foreground);
    margin-bottom: 24px;
}

/* Success Modal Customizations */
.success-modal {
    background: var(--secondary);
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 95vw;
    max-width: 355px;
    max-height: 93vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    animation: modalIn 0.2s;
    transition: max-width 0.3s cubic-bezier(0.4, 1.3, 0.6, 1),
        width 0.3s cubic-bezier(0.4, 1.3, 0.6, 1);
    margin: 40px 0;
    height: auto;
}

.success-modal-container {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.success-modal-icon {
    margin-bottom: 18px;
    background: var(--primary);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.success-modal-icon i {
    color: var(--primary-foreground);
    font-size: 2rem;
}

.success-modal-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.success-modal-message {
    text-align: center;
    color: var(--muted-foreground);
    margin-bottom: 24px;
}

/* Popups e botões de ação */
.popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.btn-confirmar {
    background: var(--primary, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-confirmar:hover {
    background: #6c3cff;
}

.btn-danger,
.btn-cancelar {
    background: #ff2d2d !important;
    color: #fff !important;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-danger:hover,
.btn-cancelar:hover {
    background: #c51818 !important;
}

.btn-voltar {
    background: var(--border, #23232b);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

/* Popup de erro destacado */
.popup-confirmacao {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 18px 32px;
    border-radius: 8px;
    z-index: 11000;
    font-size: 1.1em;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
    animation: fadeInOut 3s;
}
@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}
.popup-confirmacao.erro {
    background: #b61c1c;
    color: #fff;
    border-radius: 8px;
    padding: 18px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    z-index: 11000;
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    text-align: center;
    border: 2px solid #fff;
    animation: shake 0.3s;
}
@keyframes shake {
    0% {
        transform: translateX(-50%) translateY(0);
    }
    25% {
        transform: translateX(-48%) translateY(-2px);
    }
    50% {
        transform: translateX(-52%) translateY(2px);
    }
    75% {
        transform: translateX(-48%) translateY(-2px);
    }
    100% {
        transform: translateX(-50%) translateY(0);
    }
}

.modal-agendar .form-container {
    width: 100%;
    padding: 0;
    border: none;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
}

.modal-agendar p {
    text-align: center;
}

.logout-modal .form-container {
    padding: 20px;
}
