/* Layout fixo e responsivo para telas de cadastro */
.register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-container .container-fluid {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.register-card {
    width: 100%;
    max-width: 800px;
    min-height: 600px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

.register-card-body {
    padding: 2rem;
}

/* Altura fixa para campos de formulário */
.form-group {
    margin-bottom: 1.5rem;
    min-height: 80px;
    position: relative;
}

.form-control {
    height: 45px;
}

/* Container fixo para mensagens de erro */
.error-container {
    min-height: 24px;
    margin-top: 0.25rem;
}

.invalid-feedback {
    display: block !important;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Espaçamento consistente para seções */
.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.section-content {
    margin-bottom: 2rem;
}

/* Cards de seleção com altura fixa */
.selection-card {
    height: 280px;
    transition: transform 0.2s ease-in-out;
    border: 2px solid transparent;
}

.selection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

.selection-card.border-primary:hover {
    border-color: #0d6efd;
}

.selection-card.border-warning:hover {
    border-color: #ffc107;
}

.selection-card.border-success:hover {
    border-color: #198754;
}

.selection-card.border-info:hover {
    border-color: #0dcaf0;
}

.selection-card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 1.5rem;
}

.selection-card-content {
    flex-grow: 1;
}

.selection-card-footer {
    margin-top: auto;
}

/* Responsividade */
@media (max-width: 768px) {
    .register-card-body {
        padding: 1.5rem;
    }
    
    .selection-card {
        height: 250px;
        margin-bottom: 1rem;
    }
    
    .form-group {
        min-height: 70px;
    }
}

@media (max-width: 576px) {
    .register-card-body {
        padding: 1rem;
    }
    
    .selection-card {
        height: 220px;
    }
    
    .form-group {
        min-height: 65px;
    }
}

/* Animações suaves */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botões com espaçamento consistente */
.btn-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Alertas sem altura fixa */
.alert-container {
    margin-bottom: 1.5rem;
}

/* Oculta o container quando não há alertas visíveis */
.alert-container:not(:has(.alert:not([style*="display: none"]))) {
    display: none;
}

/* Fallback para navegadores que não suportam :has() */
.alert-container.no-alerts {
    display: none;
}

/* Prevenção de layout shift */
.prevent-shift {
    contain: layout;
}

/* Grid responsivo para formulários */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.form-col {
    flex: 1;
    padding: 0 0.75rem;
    min-width: 0;
}

@media (max-width: 768px) {
    .form-col {
        flex: 100%;
        margin-bottom: 1rem;
    }
}
