/* INCC Plugin Styles - Versão 1.1.0 */
:root {
    --incc-primary-color: #2271b1;
    --incc-secondary-color: #50575e;
    --incc-bg-color: #ffffff;
    --incc-border-color: #e2e4e7;
    --incc-text-color: #1e1e1e;
    --incc-success-color: #00a32a;
    --incc-error-color: #d63638;
    --incc-warning-color: #dba617;
    --incc-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --incc-border-radius: 8px;
    --incc-transition: all 0.3s ease;
}

/* Container Principal */
.incc-container {
    --incc-primary: var(--incc-primary-color, #2271b1);
    --incc-bg: var(--incc-bg-color, #ffffff);
    --incc-border: var(--incc-border-color, #e2e4e7);
    
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 15px 0;
    padding: 20px;
    border: 1px solid var(--incc-border);
    background-color: var(--incc-bg);
    border-radius: var(--incc-border-radius);
    display: inline-block;
    box-shadow: var(--incc-box-shadow);
    max-width: 100%;
    box-sizing: border-box;
    transition: var(--incc-transition);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

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

/* Cabeçalho */
.incc-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.incc-label {
    font-weight: 700;
    color: var(--incc-primary);
    margin: 0 8px 0 0;
    font-size: 1.1em;
    display: inline-flex;
    align-items: center;
}

/* Valor Principal */
.incc-main-value {
    display: flex;
    align-items: center;
    margin: 8px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.incc-value {
    color: #2c3e50 !important; /* Cor escura para melhor contraste */
    font-weight: 800;
    font-size: 1.8em;
    line-height: 1.2;
}

/* Ícone de Tendência */
.incc-trend {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    font-size: 0.9em;
    font-weight: 600;
}

.incc-trend.up {
    color: var(--incc-success-color);
}

.incc-trend.down {
    color: var(--incc-error-color);
}

.incc-trend i {
    margin-right: 4px;
    font-size: 1.2em;
}

/* Metadados */
.incc-meta {
    font-size: 0.9em;
    color: #2c3e50 !important; /* Cor escura para melhor contraste */
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px dashed rgba(44, 62, 80, 0.3);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.incc-meta-item {
    display: flex;
    align-items: center;
    margin-right: 15px;
    color: #2c3e50 !important;
}

.incc-meta-item i {
    margin-right: 6px;
    font-size: 1.1em;
    opacity: 0.8;
}

.incc-meta-value {
    color: #2c3e50 !important;
    font-weight: 600;
}

.incc-date, 
.incc-variation, 
.incc-accumulated {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    white-space: nowrap;
}

/* Descrição */
.incc-description {
    margin: 12px 0 0;
    font-size: 0.9em;
    color: var(--incc-secondary-color);
    line-height: 1.5;
    font-style: italic;
}

/* Fonte */
.incc-source {
    margin: 15px 0 0;
    font-size: 0.8em;
    color: var(--incc-secondary-color);
    opacity: 0.8;
    text-align: right;
}

.incc-source a {
    color: var(--incc-primary);
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
    transition: var(--incc-transition);
}

.incc-source a:hover {
    opacity: 0.8;
}

/* Estados de Erro */
.incc-error {
    padding: 15px;
    margin: 10px 0;
    border-left: 4px solid var(--incc-error-color);
    background-color: rgba(214, 54, 56, 0.05);
    color: var(--incc-error-color);
    border-radius: 4px;
}

.incc-error .incc-debug {
    font-size: 0.85em;
    color: var(--incc-error-color);
    margin: 5px 0 0 0;
    opacity: 0.8;
}

/* Estilos para Admin */
.wrap .incc-clear-cache {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    max-width: 800px;
    border-radius: var(--incc-border-radius);
}

.wrap .incc-clear-cache h2 {
    margin-top: 0;
    padding-top: 0;
    color: var(--incc-primary);
}

/* Ajustes de Responsividade */
@media screen and (max-width: 768px) {
    .incc-container {
        padding: 15px;
        width: 100%;
        display: block;
    }
    
    .incc-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .incc-meta-item {
        margin-right: 0;
    }
    
    .incc-date, 
    .incc-variation, 
    .incc-accumulated {
        display: block;
        margin: 5px 0;
    }
}

@media screen and (max-width: 480px) {
    .incc-container {
        text-align: center;
        padding: 15px 12px;
    }
    
    .incc-header {
        justify-content: center;
    }
    
    .incc-main-value {
        justify-content: center;
    }
    
    .incc-value {
        font-size: 1.6em;
    }
    
    .incc-meta {
        justify-content: center;
        text-align: center;
    }
    
    .incc-meta-item {
        justify-content: center;
        width: 100%;
    }
    
    .incc-source {
        text-align: center;
    }
}

/* Suporte RTL */
.rtl .incc-label {
    margin-right: 0;
    margin-left: 8px;
}

.rtl .incc-date {
    margin-left: 0;
    margin-right: 8px;
}

.rtl .incc-meta-item i,
.rtl .incc-trend i {
    margin-right: 0;
    margin-left: 6px;
}

/* Animações */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.incc-updated {
    animation: pulse 1.5s ease-in-out;
}

/* Ícones (usando classes genéricas que podem ser substituídas por Font Awesome ou outro) */
.incc-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
    vertical-align: middle;
}

/* Estilos para o seletor de tema/classe personalizada */
.incc-theme-default {
    /* Usa as variáveis padrão */
}

.incc-theme-minimal {
    --incc-bg-color: #f8f9fa;
    --incc-border: none;
    --incc-box-shadow: none;
}

.incc-theme-dark {
    --incc-bg-color: #1e1e1e;
    --incc-text-color: #f0f0f0;
    --incc-border: #444;
    --incc-primary-color: #4dabf7;
    --incc-secondary-color: #adb5bd;
    color: var(--incc-text-color);
}

/* Tooltip */
.incc-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    border-bottom: 1px dotted var(--incc-secondary-color);
}

.incc-tooltip .incc-tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85em;
    line-height: 1.4;
}

.incc-tooltip:hover .incc-tooltiptext {
    visibility: visible;
    opacity: 1;
}
