/**
 * Componente Modal
 */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transform: translateY(20px);
    transition: transform 0.2s ease-out;
}

@media (max-width: 500px) {
    .modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .modal-body {
        flex-grow: 1;
        overflow-y: auto;
    }
}

.modal-overlay.show .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Radio buttons visuais para seleção (cores/ícones) */
.visual-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.visual-selector input[type="radio"],
.visual-selector input[type="checkbox"] {
    display: none;
}

.visual-selector label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

.visual-selector input[type="radio"]:checked + label,
.visual-selector input[type="checkbox"]:checked + label {
    border-color: #000;
    box-shadow: 0 0 0 2px #fff inset;
    transform: scale(1.1);
}

.visual-selector-color {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}
