/* Estilos customizados para o projeto de consulta CNPJ gov.br */

/* Reset e configurações gerais */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Barra superior gov.br */
.govbr-bar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

/* Botões circulares da barra superior */
.br-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.br-button.circle {
    border-radius: 50%;
}

.br-button.small {
    width: 32px;
    height: 32px;
    padding: 0;
}

.br-button:hover {
    background-color: #f3f4f6;
    transform: scale(1.05);
}

.br-button:active {
    transform: scale(0.95);
}

.br-button i {
    font-size: 14px;
    color: #2563eb;
}

.br-button:hover i {
    color: #1d4ed8;
}

/* Navegação */
nav {
    border-bottom: 1px solid #e5e7eb;
}

/* Formulário */
.form-container {
    max-width: 400px;
    margin: 0 auto;
}

.form-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 24px;
}

/* Input customizado */
.cnpj-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s;
}

.cnpj-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Botão principal */
.btn-primary {
    width: 100%;
    background: #2563eb;
    color: white;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Resultado da consulta */
.resultado-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 24px;
    margin-top: 24px;
}

.dados-empresa {
    display: grid;
    gap: 16px;
}

.campo-dados {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.campo-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.campo-valor {
    color: #6b7280;
    font-size: 14px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

/* Status da empresa */
.status-ativo {
    color: #059669;
    background: #d1fae5;
    border-color: #a7f3d0;
}

.status-inativo {
    color: #dc2626;
    background: #fee2e2;
    border-color: #fecaca;
}

/* Seções expansíveis */
.section-toggle {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.section-toggle:hover {
    background: #f9fafb;
}

.section-content {
    margin-top: 8px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 6px;
    display: none;
}

.section-content.active {
    display: block;
}

.section-icon {
    transition: transform 0.2s;
}

.section-icon.rotated {
    transform: rotate(180deg);
}

/* Alertas */
.alert {
    padding: 16px;
    border-radius: 6px;
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .section-toggle {
        padding: 12px;
    }
    
    .govbr-bar .hidden-mobile {
        display: none;
    }
}

/* Breadcrumb */
.breadcrumb {
    background: #f9fafb;
    padding: 12px 0;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #1d4ed8;
}

/* Ajustes responsivos para breadcrumb */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 8px 0;
    }
    
    .breadcrumb nav {
        font-size: 12px;
    }
    
    .breadcrumb .fas.fa-home {
        font-size: 14px !important;
    }
    
    .breadcrumb .mx-2 {
        margin-left: 4px;
        margin-right: 4px;
    }
    
    .breadcrumb .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Footer */
footer {
    background: #1e3a8a;
    color: white;
    margin-top: 64px;
}

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

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

/* Utilitários */
.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.space-x-4 > * + * {
    margin-left: 16px;
}

.space-y-2 > * + * {
    margin-top: 8px;
}

.w-full {
    width: 100%;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.p-4 {
    padding: 16px;
}

.rounded {
    border-radius: 6px;
}

.shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Modo Alto Contraste */
body.high-contrast {
    background: #000000 !important;
    color: #ffffff !important;
}

body.high-contrast .bg-white {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

body.high-contrast .text-gray-700,
body.high-contrast .text-gray-600,
body.high-contrast .text-gray-800 {
    color: #ffffff !important;
}

body.high-contrast .bg-gray-50 {
    background: #000000 !important;
}

body.high-contrast .border-gray-200,
body.high-contrast .border-gray-300 {
    border-color: #ffffff !important;
}

body.high-contrast .br-button:hover {
    background-color: #333333 !important;
}

body.high-contrast .bg-blue-600 {
    background: #ffffff !important;
    color: #000000 !important;
}

body.high-contrast .text-blue-600 {
    color: #ffffff !important;
}

/* Estilos para resultado estilo Simples Nacional */
.resultado-simples-nacional {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Cartões verdes */
.cartao-verde {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.cartao-header {
    background: #10b981;
    color: white;
    padding: 12px 16px;
    font-weight: 600;
}

.cartao-titulo {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.cartao-content {
    padding: 16px;
}

/* Informações dentro dos cartões */
.info-linha {
    display: flex;
    margin-bottom: 8px;
    align-items: flex-start;
}

.info-label {
    font-weight: 600;
    color: #374151;
    min-width: 180px;
    margin-right: 12px;
    font-size: 14px;
}

.info-valor {
    color: #1f2937;
    font-size: 14px;
    flex: 1;
}

.info-descricao {
    font-size: 12px;
    color: #6b7280;
    margin: 8px 0 16px 0;
    font-style: italic;
}

.info-observacao {
    font-size: 12px;
    color: #6b7280;
    background: #f9fafb;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #fbbf24;
}

/* Status */
.status-ativo {
    color: #059669;
    font-weight: 600;
}

.status-inativo {
    color: #dc2626;
    font-weight: 600;
}

/* Botões de ação */
.botoes-acao {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-acao {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-voltar {
    background: #6b7280;
    color: white;
}

.btn-voltar:hover {
    background: #4b5563;
}

.btn-emitir {
    background: #059669;
    color: white;
}

.btn-emitir:hover {
    background: #047857;
}

/* Links de ações */
.links-acoes {
    margin-top: 24px;
}

.link-acao {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.link-acao:hover {
    background: #f3f4f6;
    border-color: #2563eb;
}

.link-acao i {
    color: #6b7280;
    margin-right: 12px;
    width: 16px;
    text-align: center;
}

.link-acao span {
    color: #374151;
    font-size: 14px;
}

/* Responsividade para cartões */
@media (max-width: 768px) {
    .resultado-simples-nacional {
        padding: 12px;
    }
    
    .cartao-content {
        padding: 12px;
    }
    
    .info-linha {
        flex-direction: column;
        margin-bottom: 12px;
    }
    
    .info-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 4px;
        font-weight: 700;
    }
    
    .botoes-acao {
        flex-direction: column;
    }
    
    .btn-acao {
        width: 100%;
        padding: 12px;
    }
}
