/* Consulta Rede Credenciada - WordPress Plugin Styles */

.crc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.crc-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border-radius: 12px;
}

.crc-logo {
    max-height: 80px;
    width: auto;
    margin-bottom: 15px;
}

.crc-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.crc-form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.crc-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.crc-form-group {
    display: flex;
    flex-direction: column;
}

.crc-form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 1rem;
}

.crc-select {
    width: 100%;
    height: 55px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.crc-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.crc-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.crc-btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crc-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
}

.crc-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.crc-btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.crc-btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.4);
}

.crc-btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.crc-loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.crc-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: crc-spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.crc-results {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.crc-results-header {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: black;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.crc-results-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.crc-results-actions {
    display: flex;
    gap: 10px;
}

.crc-results-content {
    padding: 30px;
}

.crc-stats {
    background: linear-gradient(135deg, #007BC4 0%, #059669 100%);
    color: white;
    padding: 15px 30px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 8px;
}

.crc-stats h4 {
    margin: 0;
    font-size: 1.2rem;
}

/* === CARDS DE RESULTADOS === */

.crc-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid #3b82f6;
    transition: box-shadow 0.3s ease;
    /* REMOVIDO display: none das media queries */
}

.crc-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.crc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.crc-card-title {
    margin: 0;
    color: #1e40af;
    font-size: 1.3rem;
    font-weight: 700;
}

.crc-tipo-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.crc-card-item {
    display: flex;
    flex-direction: column;
}

.crc-card-full {
    grid-column: 1 / -1;
}

.crc-card-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.crc-card-value {
    color: #374151;
    font-size: 1rem;
}

/* === ESPECIALIDADES === */

.crc-especialidades-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.crc-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    margin: 2px;
}

/* === QUALIFICAÇÕES === */

.crc-qualificacoes-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.crc-qualificacoes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.crc-qualificacao-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 2px;
}

.crc-qualificacao-icone {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.crc-qualificacao-validade {
    color: rgba(255,255,255,0.8);
    font-size: 0.7rem;
    font-style: italic;
    margin-left: 4px;
}

/* === CONTATOS === */

.crc-contatos-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crc-contato-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.crc-contato-item i {
    color: #3b82f6;
    width: 16px;
}

/* === PROFISSIONAIS === */

.crc-profissionais-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.crc-profissional-item {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #e1e5e9;
    font-size: 13px;
}

.crc-profissional-nome {
    font-weight: 600;
    color: #333;
}

.crc-profissional-tipo {
    color: #666;
    font-size: 12px;
}

/* === TABELA (REMOVIDA AS REGRAS CONFLITANTES) === */

.crc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: none; /* Tabela sempre escondida, usando apenas cards */
}

.crc-table th,
.crc-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.crc-table th {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.crc-table tbody tr:hover {
    background-color: #f8fafc;
}

.crc-table tbody tr:last-child td {
    border-bottom: none;
}

/* === OUTROS ELEMENTOS === */

.crc-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.crc-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6b7280;
    font-style: italic;
}

.resultado-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.resultado-card div {
    margin-bottom: 4px;
}

/* === ANIMAÇÕES === */

.crc-card {
    animation: fadeInUp 0.5s ease-out;
}

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

/* === RESPONSIVE DESIGN (CORRIGIDO) === */

@media (max-width: 768px) {
    .crc-container {
        padding: 10px;
    }
    
    .crc-form-row {
        grid-template-columns: 1fr;
    }
    
    .crc-form-actions {
        flex-direction: column;
    }
    
    .crc-results-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .crc-card-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .crc-card-grid {
        grid-template-columns: 1fr;
    }
    
    .crc-qualificacoes-container,
    .crc-contatos-container,
    .crc-profissionais-lista {
        justify-content: center;
    }
    
    .crc-title {
        font-size: 1.5rem;
    }
}

/* REMOVIDO COMPLETAMENTE A REGRA QUE ESCONDIA OS CARDS:
@media (min-width: 769px) {
    .crc-card {
        display: none;  <- ESTA LINHA FOI REMOVIDA
    }
}
*/

/* === WORDPRESS COMPATIBILITY === */

.crc-container p {
    margin-bottom: 1em;
}

.crc-container * {
    box-sizing: border-box;
}

.crc-results,
.crc-results th,
.crc-results td {
    color: #000 !important;
    font-size: 13px !important;
}

/* === CORREÇÃO PARA NOME DA EMPRESA === */

.crc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
    background: transparent !important; /* Garantir fundo transparente */
}

.crc-card-title {
    margin: 0 !important;
    color: #1e40af !important; /* Azul escuro */
    font-size: 1.1rem !important; /* REDUZIDO de 1.3rem para 1.1rem */
    font-weight: 600 !important; /* REDUZIDO de 700 para 600 */
    text-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    line-height: 1.3 !important; /* Ajustado proporcionalmente */
}
/* Alternativa com cor mais contrastante se necessário */
.crc-card-title.high-contrast {
    color: #000000 !important; /* Preto puro para máximo contraste */
}

.crc-card-title:hover {
    color: #3b82f6 !important; /* Azul mais claro no hover */
}

/* === CORREÇÃO PARA TIPO BADGE === */

.crc-tipo-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
    color: white !important;
    padding: 6px 15px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-shadow: none !important;
}

/* === GARANTIR CONTRASTE EM TODOS OS LABELS === */

.crc-card-label {
    font-weight: 600 !important;
    color: #4b5563 !important; /* Cinza mais escuro */
    font-size: 0.9rem !important;
    margin-bottom: 5px !important;
    background: transparent !important;
}

.crc-card-value {
    color: #1f2937 !important; /* Cinza muito escuro */
    font-size: 1rem !important;
    background: transparent !important;
}

/* === DEBUGAR VISUALMENTE (REMOVER DEPOIS) === */

.crc-card-title.debug {
    background: yellow !important;
    color: red !important;
    border: 2px solid green !important;
}

/* === ESTILOS PARA QUALIFICAÇÕES === */

.crc-qualificacoes-section {
    margin-top: 15px;
}

.crc-qualificacoes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.crc-qualificacao-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crc-qualificacao-icone {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.crc-qualificacao-validade {
    font-size: 0.7rem;
    opacity: 0.9;
}

/* === ESTILOS PARA CONTATOS === */

.crc-contatos-container {
    margin-top: 8px;
}

.crc-contato-item {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

/* === ESTILOS PARA PROFISSIONAIS === */

.crc-profissionais-lista {
    margin-top: 8px;
}

.crc-profissional-item {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.crc-profissional-nome {
    font-weight: 600;
    color: #374151;
}

.crc-profissional-tipo {
    color: #6b7280;
    font-style: italic;
}

/* === ESPECIALIDADES === */

.crc-especialidades-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.crc-card-full {
    grid-column: 1 / -1;
}
