/* Consulta CNPJ Plugin Styles */

.consulta-cnpj-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.consulta-cnpj-container.theme-dark {
    background: #2c3e50;
    border-color: #34495e;
    color: #ecf0f1;
}

.consulta-cnpj-form h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.theme-dark .consulta-cnpj-form h3 {
    color: #ecf0f1;
}

.cnpj-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.theme-dark .form-group label {
    color: #bdc3c7;
}

.cnpj-input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #fff;
}

.cnpj-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.theme-dark .cnpj-input {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ecf0f1;
}

.theme-dark .cnpj-input:focus {
    border-color: #3498db;
}

.consulta-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
    min-width: 150px;
}

.consulta-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

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

.consulta-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading */
.consulta-cnpj-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.theme-dark .loading-spinner {
    border-color: #4a5f7a;
    border-top-color: #3498db;
}

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

/* Result */
.consulta-cnpj-result {
    margin-top: 20px;
}

/* Disclaimer */
.consulta-disclaimer {
    background: linear-gradient(135deg, #e8f4fd, #d1ecf1);
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.theme-dark .consulta-disclaimer {
    background: linear-gradient(135deg, #1e3a5f, #2c5282);
    border-color: #3182ce;
    border-left-color: #63b3ed;
}

.consulta-disclaimer h3 {
    color: #0c5460;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.theme-dark .consulta-disclaimer h3 {
    color: #90cdf4;
}

.disclaimer-content {
    font-size: 14px;
    line-height: 1.6;
}

.disclaimer-content p {
    margin: 0 0 10px 0;
    color: #0c5460;
    font-weight: 600;
}

.theme-dark .disclaimer-content p {
    color: #90cdf4;
}

.disclaimer-content ul {
    margin: 0;
    padding-left: 20px;
    color: #155724;
}

.theme-dark .disclaimer-content ul {
    color: #c6f6d5;
}

.disclaimer-content li {
    margin-bottom: 8px;
}

.disclaimer-content a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.disclaimer-content a:hover {
    text-decoration: underline;
}

.theme-dark .disclaimer-content a {
    color: #63b3ed;
}

.company-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.theme-dark .company-header {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border-left-color: #3498db;
}

.company-name {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.theme-dark .company-name {
    color: #ecf0f1;
}

.company-fantasy {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0 0 10px 0;
    font-style: italic;
}

.theme-dark .company-fantasy {
    color: #bdc3c7;
}

.company-cnpj {
    font-size: 18px;
    font-weight: 600;
    color: #3498db;
    margin: 0;
    font-family: 'Courier New', monospace;
}

.company-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 10px;
}

.status-ativa {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-inativa {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.theme-dark .status-ativa {
    background: #155724;
    color: #d4edda;
}

.theme-dark .status-inativa {
    background: #721c24;
    color: #f8d7da;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Desktop optimization */
@media (min-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.info-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 18px;
}

.theme-dark .info-card {
    background: #34495e;
    border-color: #4a5f7a;
}

.info-card h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 16px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 6px;
}

.theme-dark .info-card h4 {
    color: #ecf0f1;
}

.info-item {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 20px;
}

.info-label {
    font-weight: 600;
    color: #555;
    min-width: 90px;
    font-size: 13px;
    flex-shrink: 0;
    line-height: 1.3;
}

.theme-dark .info-label {
    color: #bdc3c7;
}

.info-value {
    color: #333;
    flex: 1;
    font-size: 13px;
    line-height: 1.3;
    word-break: break-word;
}

.theme-dark .info-value {
    color: #ecf0f1;
}

/* Desktop specific optimizations */
@media (min-width: 1024px) {
    .info-item {
        margin-bottom: 6px;
    }
    
    .info-label {
        min-width: 85px;
        font-size: 12px;
    }
    
    .info-value {
        font-size: 12px;
    }
    
    .info-card {
        padding: 15px;
    }
    
    .info-card h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }
}

/* Activities */
.activities-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    padding: 8px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.theme-dark .activity-item {
    background: #2c3e50;
    border-color: #4a5f7a;
}

.activity-code {
    font-weight: 600;
    color: #3498db;
    font-size: 12px;
}

.activity-description {
    margin-top: 3px;
    color: #555;
    font-size: 12px;
    line-height: 1.3;
}

.theme-dark .activity-description {
    color: #bdc3c7;
}

/* Desktop optimization for activities */
@media (min-width: 1024px) {
    .activity-item {
        padding: 6px 8px;
        margin-bottom: 4px;
    }
    
    .activity-code {
        font-size: 11px;
    }
    
    .activity-description {
        font-size: 11px;
        margin-top: 2px;
    }
}

/* Partners */
.partners-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.partner-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    border-left: 4px solid #e74c3c;
}

.theme-dark .partner-item {
    background: #2c3e50;
    border-color: #4a5f7a;
}

.partner-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 3px;
    line-height: 1.3;
}

.theme-dark .partner-name {
    color: #ecf0f1;
}

.partner-qualification {
    color: #7f8c8d;
    font-size: 12px;
    line-height: 1.3;
}

.theme-dark .partner-qualification {
    color: #bdc3c7;
}

/* Desktop optimization for partners */
@media (min-width: 1024px) {
    .partner-item {
        padding: 8px;
        margin-bottom: 6px;
    }
    
    .partner-name {
        font-size: 13px;
        margin-bottom: 2px;
    }
    
    .partner-qualification {
        font-size: 11px;
    }
}

/* Error */
.consulta-cnpj-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.theme-dark .consulta-cnpj-error {
    background: #721c24;
    border-color: #a94442;
}

.error-message h4 {
    color: #721c24;
    margin: 0 0 10px 0;
}

.theme-dark .error-message h4 {
    color: #f8d7da;
}

.error-text {
    color: #721c24;
    margin: 0;
}

.theme-dark .error-text {
    color: #f8d7da;
}

/* Responsive */
@media (max-width: 768px) {
    .consulta-cnpj-container {
        margin: 10px;
        padding: 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .cnpj-form {
        gap: 10px;
    }
    
    .info-item {
        flex-direction: column;
        gap: 2px;
    }
    
    .info-label {
        min-width: auto;
    }
    
    .company-name {
        font-size: 20px;
    }
}

/* Print styles */
@media print {
    .consulta-cnpj-form,
    .consulta-btn {
        display: none !important;
    }
    
    .consulta-cnpj-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .company-header {
        background: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
    }
}

