/* =========================================
   ESTILS PROPIS DEL MÒDUL ANTI-CORRUPCIÓ
   gemini.css
   (Scoped sota #ac-widget per no trencar res)
   ========================================= */

#ac-widget {
    font-family: 'Inter', sans-serif; /* O la tipografia de la teva web */
    color: #334155; /* Slate 700 */
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #fff;
}

/* --- Capçalera --- */
#ac-widget .ac-header {
    border-bottom: 1px solid #0e6de9;
    padding-bottom: 30px;
    margin-bottom: 40px;
}

#ac-widget .ac-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 12px;
}

#ac-widget h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin: 0 0 16px 0;
}

#ac-widget .ac-intro {
    font-size: 1.25rem;
    color: #475569;
    border: 2px solid #0e6de9;
    padding: 16px;
    border-radius: 8px;
    line-height: 1.6;
    margin: 0;
}

/* --- Graella de Pilars --- */
#ac-widget .ac-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#ac-widget .ac-dot {
    width: 8px;
    height: 8px;
    background-color: #1e293b;
    border-radius: 50%;
    display: inline-block;
}

#ac-widget .ac-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Responsive: Tablet i Desktop */
@media (min-width: 640px) { #ac-widget .ac-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { #ac-widget .ac-grid { grid-template-columns: 1fr 1fr 1fr; } }

#ac-widget .ac-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}

#ac-widget .ac-card:hover {
    border-color: #94a3b8;
}

#ac-widget .ac-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#ac-widget .ac-icon-box {
    padding: 8px;
    background-color: #f1f5f9;
    border-radius: 6px;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ac-widget .ac-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

#ac-widget .ac-card p {
    font-size: 0.875rem;
    color: #475569;
    margin: auto 0 0 0;
    line-height: 1.5;
}

/* --- Panell Interactiu (Zona PHP) --- */
#ac-widget .ac-panel {
    background-color: #f8fafc; /* Slate 50 */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 40px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#ac-widget .ac-panel-content {
    padding: 32px;
    border: 1px solid #0e6de9;
    border-radius: 8px;
    background-color: rgb(212, 206, 206);
}

#ac-widget .ac-controls {
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: space-between;
}
@media (min-width: 768px) {
    #ac-widget .ac-controls { flex-direction: row; align-items: center; }
}

#ac-widget .ac-panel h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

#ac-widget .ac-desc {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 8px;
}

#ac-widget .ac-examples {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Botó */
#ac-widget .ac-btn {
    background-color: #0f172a;
    color: white;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
    width: 100%;
}
@media (min-width: 768px) { #ac-widget .ac-btn { width: auto; } }

#ac-widget .ac-btn:hover {
    background-color: #1e293b;
}

/* Loading & Errors */
#ac-widget .ac-loading {
    padding: 12px 24px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
#ac-widget .ac-error {
    margin-top: 16px;
    padding: 12px;
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 6px;
    text-align: center;
    font-size: 0.875rem;
}

/* --- Resultats Generats --- */
#ac-widget .ac-results {
    border-top: 1px solid #e2e8f0;
    background-color: #fff;
    padding: 32px;
    animation: acFadeIn 0.5s ease-in-out;
}

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

#ac-widget .ac-result-card {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid transparent;
}

/* Estil Lawfare (Taronja) */
#ac-widget .ac-lawfare {
    border-color: #ffedd5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
#ac-widget .ac-lawfare-header {
    background-color: #fff7ed;
    padding: 16px 24px;
    border-bottom: 1px solid #ffedd5;
    display: flex;
    align-items: center;
    gap: 12px;
}
#ac-widget .ac-lawfare-header h2 {
    color: #7c2d12;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

/* Estil Casos (Indigo) */
#ac-widget .ac-cases {
    border-color: #e0e7ff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
#ac-widget .ac-cases-header {
    background-color: #eef2ff;
    padding: 16px 24px;
    border-bottom: 1px solid #e0e7ff;
    display: flex;
    align-items: center;
    gap: 12px;
}
#ac-widget .ac-cases-header h2 {
    color: #312e81;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

/* Estil Síntesi (Fosc) */
#ac-widget .ac-summary {
    background-color: #1e293b;
    color: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
#ac-widget .ac-summary h4 {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    font-weight: 700;
}
#ac-widget .ac-summary p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Llistes i Detalls */
#ac-widget .ac-list-grid {
    display: grid;
    gap: 24px;
    padding: 24px;
}
@media (min-width: 768px) { #ac-widget .ac-list-grid { grid-template-columns: 1fr 1fr; } }

#ac-widget .ac-point {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
#ac-widget .ac-point-icon {
    background: #ffedd5;
    color: #c2410c;
    padding: 6px;
    border-radius: 6px;
    display: flex;
}

#ac-widget .ac-case-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 24px;
    padding: 24px; /* Padding intern si no usem grid */
}
#ac-widget .ac-case-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
@media (min-width: 640px) { #ac-widget .ac-case-item { flex-direction: row; padding: 0 24px 24px 24px; margin-bottom: 24px; } }

#ac-widget .ac-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #f1f5f9;
    color: #334155;
}
#ac-widget .ac-badge.bad {
    background-color: #fef2f2;
    color: #b91c1c;
}

/* Utilitats */
.hidden { display: none !important; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* Fi dels estils del mòdul Anti-Corrupció */