/* Estilos para el modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

@media (max-width: 480px) {
    .modal-container {
        padding: 1.25rem;
        width: 95%;
    }
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.modal-subtitle {
    color: #555;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #999;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

/* Estilos para el formulario tipo Material Design */
.form-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-row {
    display: flex;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    margin-bottom: 1.25rem;
}

.half-width {
    width: 50%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    position: relative;
}

.half-width .form-control {
    width: 100%;
}

.half-width .form-label {
    left: 0.5rem;
}

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-row {
        margin-bottom: 1rem;
    }
}

.emergency-group {
    position: relative;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1.25rem;
}

@media (max-width: 480px) {
    .emergency-group {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
}

.emergency-label {
    font-weight: 600;
    color: #333;
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 0;
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid #ddd;
    background-color: transparent;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-bottom: 2px solid var(--primary-color);
}

.form-label {
    position: absolute;
    left: 0;
    top: 0.75rem;
    color: #999;
    pointer-events: none;
    transition: all 0.2s ease;
}

.form-control:focus ~ .form-label,
.form-control:not(:placeholder-shown) ~ .form-label {
    top: -0.5rem;
    font-size: 0.75rem;
    color: #0D9488;
}

.form-control.is-invalid {
    border-bottom: 2px solid #dc3545;
}

.form-control.is-invalid ~ .form-label {
    color: #dc3545;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #dc3545;
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.radio-option:hover {
    border-color: #0D9488;
}

.radio-option input[type="radio"]:checked + label {
    color: #0D9488;
    font-weight: 600;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-option input[type="radio"] {
    accent-color: #0D9488;
}

/* Estilos para los selectores */
.select-group {
    margin-bottom: 1.25rem;
}

.select-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    color: #333;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
    transition: border-color 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: #0D9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

@media (max-width: 480px) {
    .form-select {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
}

button[type="submit"].bento-button-light {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: white;
    background-color: #0D9488;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-top: 1rem;
}

button[type="submit"].bento-button-light:hover {
    background-color: #0A7C72;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}
