/* Estilos para a página de cadastro de usuário */

.backgound-body {
    background-color: #f8f9fa;
}

.body-conteiner {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #f8f9fa;
    padding: 2rem 1rem;
}

.card-size {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 1.5rem 2rem;
    box-sizing: border-box;
}

/* Trial Banner */
.trial-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.trial-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.trial-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.trial-text p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.95;
    line-height: 1.4;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: nowrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    flex-shrink: 0;
}

.step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step.completed .step-number::before {
    content: "✓";
}

.step-label {
    text-align: center;
    white-space: nowrap;
}

.step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

.step-line {
    width: 60px;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Form Container e Slides */
.form-container {
    position: relative;
    overflow: hidden;
}

.form-slide {
    display: none;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.form-slide.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease-in-out;
}

.form-slide.slide-out-left {
    animation: slideOutLeft 0.3s ease-in-out;
}

.form-slide.slide-in-right {
    animation: slideInRight 0.3s ease-in-out;
}

.form-slide.slide-out-right {
    animation: slideOutRight 0.3s ease-in-out;
}

.form-slide.slide-in-left {
    animation: slideInLeft 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Button Group */
.button-group {
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 200px;
}

.button-group .btn-secondary {
    background: #6c757d;
    border: none;
}

.button-group .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Form Sections */
.form-section {
    background: #fafbfc;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid #e8eaed;
}

.section-title {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #667eea;
}

/* Trial Reminder */
.trial-reminder {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #c8e6c9;
}

.trial-reminder i {
    font-size: 1.5rem;
    color: #4caf50;
}

.card-size form {
    width: 100%;
    max-width: 100%;
}

input.form-control,
select.form-control,
textarea.form-control {
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #d1d5db;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
    background: #ffffff;
}

input.form-control:hover {
    border-color: #9ca3af;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    outline: none;
    background: #ffffff;
}

input.form-control::placeholder {
    color: #9ca3af;
    font-size: 0.95rem;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

#password_match_message {
    min-height: 1.2em;
    margin-bottom: 0.5rem;
    color: #dc3545;
    font-size: 0.95rem;
}

.validation-message {
    min-height: 1.2em;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.validation-message.valid {
    color: #28a745;
}

.validation-message.invalid {
    color: #dc3545;
}

input.is-valid {
    border-color: #28a745 !important;
}

input.is-invalid {
    border-color: #dc3545 !important;
}

button.btn-success {
    width: 100%;
    font-size: 1.15rem;
    border-radius: 8px;
    padding: 0.9rem 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

button.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

button.btn-primary {
    width: 100%;
    font-size: 1.15rem;
    border-radius: 8px;
    padding: 0.9rem 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

button.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-success {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
}

h4 {
    margin-bottom: 24px;
    color: #28a745;
}

@media (max-width: 600px) {
    .card-size {
        padding: 1rem 0.5rem;
    }
}

/* Responsividade para Tablets (768px - 991px) */
@media (max-width: 991px) {
    .card-size {
        padding: 1.5rem 1.5rem;
        max-width: 95%;
    }
    
    .trial-banner {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .trial-icon {
        font-size: 1.75rem;
    }
    
    .trial-text strong {
        font-size: 1rem;
    }
    
    .trial-text p {
        font-size: 0.8rem;
    }
    
    .form-section {
        padding: 1.25rem;
    }
    
    .section-title {
        font-size: 1rem;
    }
}

/* Responsividade para Tablets Pequenos (576px - 767px) */
@media (max-width: 767px) {
    .body-conteiner {
        padding: 1rem 0.5rem;
    }
    
    .card-size {
        padding: 1.25rem 1rem;
        max-width: 98%;
    }
    
    .progress-indicator {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-line {
        width: 40px;
    }
    
    .button-group {
        gap: 0.75rem;
    }
    
    .button-group .btn {
        min-width: 150px;
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
    
    button.btn-primary,
    button.btn-success {
        font-size: 1rem;
        padding: 0.8rem 1.25rem;
    }
}

/* Responsividade para Mobile (até 575px) */
@media (max-width: 575px) {
    .body-conteiner {
        padding: 0.75rem 0.25rem;
    }
    
    .card-size {
        padding: 1rem 0.75rem;
        max-width: 98vw;
        border-radius: 12px;
    }
    
    .trial-banner {
        padding: 0.875rem;
        gap: 0.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .trial-icon {
        font-size: 1.5rem;
    }
    
    .trial-text strong {
        font-size: 0.95rem;
    }
    
    .trial-text p {
        font-size: 0.75rem;
    }
    
    .progress-indicator {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.7rem;
    }
    
    .step-line {
        width: 30px;
        height: 2px;
    }
    
    .form-section {
        padding: 1rem 0.75rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 0.95rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.4rem;
    }
    
    input.form-control,
    select.form-control,
    textarea.form-control {
        font-size: 0.9rem;
        padding: 0.65rem 0.85rem;
    }
    
    .trial-reminder {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .trial-reminder i {
        font-size: 1.25rem;
    }
    
    .button-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .button-group .btn {
        width: 100%;
        min-width: 100%;
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
    
    button.btn-primary,
    button.btn-success {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
    
    .card-size form {
        padding: 0;
    }
}

/* Responsividade para Mobile Muito Pequeno (até 400px) */
@media (max-width: 400px) {
    .card-size {
        padding: 0.75rem 0.5rem;
    }
    
    .trial-banner {
        padding: 0.75rem 0.5rem;
    }
    
    .form-section {
        padding: 0.75rem 0.5rem;
    }
    
    .progress-indicator {
        gap: 0.35rem;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .step-label {
        font-size: 0.65rem;
    }
    
    .step-line {
        width: 20px;
    }
    
    .section-title {
        font-size: 0.9rem;
    }
    
    input.form-control,
    select.form-control,
    textarea.form-control {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
    }
    
    button.btn-primary,
    button.btn-success,
    .button-group .btn {
        font-size: 0.875rem;
        padding: 0.7rem 0.875rem;
    }
}

/* Garante que nada vaze do card */
.card-size * {
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

/* ============================================================
   AUTOCOMPLETE DE CIDADE - UX/UI Aprimorado
   ============================================================ */

/* Container do autocomplete com isolamento visual completo */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-top: 2px solid #3b82f6;
    border-radius: 0 0 10px 10px;
    max-height: 320px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    display: none;
    margin-top: 0;
    animation: fadeInDown 0.2s ease-out;
}

/* Animação de entrada suave */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Item individual do autocomplete */
.autocomplete-item {
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    line-height: 1.6;
    border-bottom: 1px solid #f1f5f9;
    background-color: #ffffff;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    position: relative;
}

/* Último item sem borda inferior */
.autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

/* Estados de interação: Hover e Active (teclado) */
.autocomplete-item:hover,
.autocomplete-item.active {
    background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    padding-left: 22px;
    font-weight: 500;
}

/* Indicador visual no hover */
.autocomplete-item:hover::before,
.autocomplete-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 0 4px 4px 0;
}

/* Destaque do termo pesquisado */
.autocomplete-item strong {
    font-weight: 700;
    color: #2563eb;
    background: linear-gradient(120deg, #fef3c7 0%, #fde68a 100%);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Estado de foco no item (acessibilidade) */
.autocomplete-item:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
    background-color: #eff6ff;
}

/* Container do campo cidade precisa ser relativo para o absolute funcionar */
.col-md-5:has(#id_cidadeEmpresa) {
    position: relative;
}

/* Input de cidade */
#id_cidadeEmpresa {
    transition: all 0.2s ease;
}

/* Quando o autocomplete está ativo, muda o visual do input */
#id_cidadeEmpresa:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-radius: 8px 8px 0 0;
}

/* Estado quando há sugestões visíveis */
#id_cidadeEmpresa.autocomplete-active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

/* Scrollbar customizada e moderna */
.autocomplete-suggestions::-webkit-scrollbar {
    width: 10px;
}

.autocomplete-suggestions::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 0 0 10px 0;
    border-left: 1px solid #e2e8f0;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 6px;
    border: 2px solid #f8fafc;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}

/* Fallback para Firefox */
.autocomplete-suggestions {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}
