/* ==========================================================================
   Tema scuro — area Influencer: Trova Influencer (influencer_hiring.php +
   feed AJAX influencer_feed.php), Preferiti (favorites.php), dettaglio
   influencer (user_details.php → partner_collabrations/user_details_desc.php).
   Gli stili chiari vivono in include/influencer_table_style.php e nei <style>
   inline delle pagine: qui solo override sotto html[data-theme="dark"].
   ========================================================================== */

/* --- Card tabella (.cu-card, condivisa hiring/preferiti) ------------------- */
html[data-theme="dark"] .cu-card {
    background: var(--cu-surface);
    border-color: var(--cu-border);
    box-shadow: var(--cu-shadow-sm), 0 10px 28px -14px rgba(0, 0, 0, .6);
}

/* Ricerca DataTable: campo scuro, lente più chiara */
html[data-theme="dark"] .cu-card .dataTables_filter label {
    color: var(--cu-text-3);
}

html[data-theme="dark"] .cu-card .dataTables_filter input {
    background: var(--cu-surface-2) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a8986' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>") no-repeat 10px center !important;
    border-color: var(--cu-border-2) !important;
    color: var(--cu-text);
}

html[data-theme="dark"] .cu-card .dataTables_filter input:focus {
    background-color: var(--cu-surface-2) !important;
    border-color: var(--cu-primary) !important;
    box-shadow: var(--cu-focus);
}

/* Paginazione: il <li> ha uno sfondo chiaro in hover nello stile inline */
html[data-theme="dark"] .cu-card .dataTables_paginate .paginate_button,
html[data-theme="dark"] .cu-card .dataTables_paginate .paginate_button:hover {
    background: transparent !important;
    color: var(--cu-text-2) !important;
}

html[data-theme="dark"] .cu-card .dataTables_paginate .page-link {
    border-radius: 8px;
}

html[data-theme="dark"] .cu-card .dataTables_paginate .page-item.disabled .page-link {
    color: var(--cu-text-4);
}

html[data-theme="dark"] .cu-card .dataTables_info {
    color: var(--cu-text-3);
}

/* --- Tabella influencer --------------------------------------------------- */
html[data-theme="dark"] table.cu-table thead th {
    background: var(--cu-surface-2) !important;
    color: var(--cu-text-2);
    border-bottom: 1px solid var(--cu-border) !important;
}

html[data-theme="dark"] table.cu-table tbody tr,
html[data-theme="dark"] table.cu-table tbody tr.odd,
html[data-theme="dark"] table.cu-table tbody tr.even {
    background-color: transparent !important;
}

html[data-theme="dark"] table.cu-table tbody td {
    color: var(--cu-text-2);
    border-bottom: 1px solid var(--cu-border) !important;
}

html[data-theme="dark"] table.cu-table tbody tr:hover td {
    background: rgba(255, 255, 255, .025);
}

/* Riga "nessun risultato" della ricerca */
html[data-theme="dark"] table.cu-table td.dataTables_empty {
    color: var(--cu-text-3);
}

/* Profilo: avatar con iniziale + nome */
html[data-theme="dark"] .cu-avatar {
    background: var(--cu-primary-soft);
    color: var(--cu-primary-hi);
}

html[data-theme="dark"] .cu-name {
    color: var(--cu-text);
}

html[data-theme="dark"] .cu-name:hover {
    color: var(--cu-primary-hi);
}

/* Chip settori neutri */
html[data-theme="dark"] .cu-chip {
    background: var(--cu-surface-3);
    color: var(--cu-text-2);
}

/* Rating, engagement, numeri */
html[data-theme="dark"] .cu-badge-rating {
    color: var(--cu-text-2);
}

html[data-theme="dark"] .cu-badge-rating .fa-star {
    color: var(--cu-warning);
}

html[data-theme="dark"] .cu-badge-eng,
html[data-theme="dark"] .cu-followers,
html[data-theme="dark"] .cu-cost {
    color: var(--cu-text);
}

/* Azioni: cuore preferiti + invito */
html[data-theme="dark"] .cu-heart {
    color: var(--cu-text-4);
}

html[data-theme="dark"] .cu-heart:hover {
    background: rgba(251, 113, 133, .12);
    color: #fb7185;
}

html[data-theme="dark"] .cu-heart.is-fav {
    color: #fb7185;
}

html[data-theme="dark"] .cu-invite {
    background: var(--cu-primary-soft);
    color: var(--cu-primary-hi) !important;
}

html[data-theme="dark"] .cu-invite:hover {
    background: var(--cu-primary);
    color: #fff !important;
}

/* Toast preferiti */
html[data-theme="dark"] .cu-toast {
    background: var(--cu-surface-4);
    color: var(--cu-text);
    border: 1px solid var(--cu-border-3);
    box-shadow: var(--cu-shadow-lg);
}

/* Stato vuoto (Preferiti senza influencer) */
html[data-theme="dark"] .cu-empty i {
    color: var(--cu-border-3);
}

html[data-theme="dark"] .cu-empty h3 {
    color: var(--cu-text);
}

html[data-theme="dark"] .cu-empty p {
    color: var(--cu-text-3);
}

html[data-theme="dark"] .cu-empty a {
    color: var(--cu-primary-hi);
}

/* --- Modale "Informazioni utente" (#user_info_modal, influencer_hiring) ---- */
html[data-theme="dark"] #user_info_modal .close,
html[data-theme="dark"] #collaboration_list_modal .close {
    color: var(--cu-text-3);
}

html[data-theme="dark"] #user_info_modal .close:hover,
html[data-theme="dark"] #collaboration_list_modal .close:hover {
    color: var(--cu-text);
}

/* valori chiari, etichette ("Categoria:", "Reach :"...) attenuate */
html[data-theme="dark"] #user_info_modal .modal-body label {
    color: var(--cu-text);
}

html[data-theme="dark"] #user_info_modal .ui_stats_1 label.bold,
html[data-theme="dark"] #user_info_modal .ui_stats_2 label.bold {
    color: var(--cu-text-3);
}

html[data-theme="dark"] #user_info_modal .ui_avatar {
    background: var(--cu-surface-3);
}

html[data-theme="dark"] #user_info_modal .modal-body .sector {
    background: var(--cu-primary-soft-2);
    color: var(--cu-primary-hi);
}

html[data-theme="dark"] #user_info_modal .row .green_title {
    color: var(--cu-primary-hi);
}

/* Box audience: l'ombra chiara diventa superficie con bordo */
html[data-theme="dark"] #user_info_modal .ui_aud_data {
    background: var(--cu-surface-2);
    border: 1px solid var(--cu-border-2);
    box-shadow: none;
}

html[data-theme="dark"] #user_info_modal .ui_aud_data label {
    color: var(--cu-primary-hi);
}

html[data-theme="dark"] #user_info_modal .ui_aud_data label[style] {
    color: var(--cu-text-2) !important;
}

html[data-theme="dark"] #user_info_modal .ui_aud_data .female {
    color: #ff9a96;
}

html[data-theme="dark"] #user_info_modal .ui_post_img {
    background: var(--cu-surface-2);
    border-color: var(--cu-border-3);
}

/* Icona "?" (img/question.png) scura: schiarita */
html[data-theme="dark"] #user_info_modal img.help_text {
    filter: invert(1) brightness(.85);
}

/* --- Modale "Lista delle Campagne" (invito, hiring + preferiti) ------------ */
html[data-theme="dark"] #collaboration_list_modal .modal-body .campaign_slot {
    background: var(--cu-surface-2);
    border: 1px solid var(--cu-border-2);
    box-shadow: var(--cu-shadow-sm);
    margin-bottom: 10px;
    transition: background .15s ease, border-color .15s ease;
}

html[data-theme="dark"] #collaboration_list_modal .modal-body .campaign_slot:hover {
    background: var(--cu-surface-3);
    border-color: var(--cu-primary);
}

html[data-theme="dark"] #collaboration_list_modal .modal-body .campaign_cover {
    background: var(--cu-surface-3);
}

html[data-theme="dark"] #collaboration_list_modal .modal-body .campaign_name {
    color: var(--cu-text);
}

html[data-theme="dark"] #collaboration_list_modal .modal-body .campaign_desc {
    color: var(--cu-text-2);
}

/* --- Dettaglio influencer (user_details.php) ------------------------------ */
/* classi di css/custom.css usate solo da partner_collabrations/user_details_desc.php */
html[data-theme="dark"] .new_section_description .campaigns {
    background-color: var(--cu-surface);
    border-color: var(--cu-border-2);
    border-radius: 12px;
}

html[data-theme="dark"] .new_section_description .border-bottom {
    border-bottom-color: var(--cu-border-2) !important;
}

html[data-theme="dark"] .new_section_description .campaigns_body h4 {
    color: var(--cu-text);
}

html[data-theme="dark"] .new_section_description .overall small {
    color: var(--cu-text-3);
}

html[data-theme="dark"] .new_section_description .overall label {
    color: var(--cu-primary-hi);
}

/* Engagement in blu (.yellow di custom.css): blu leggibile sul fondo scuro */
html[data-theme="dark"] .new_section_description .overall label.yellow {
    color: var(--cu-info) !important;
}

html[data-theme="dark"] .new_section_description .sep_section {
    border-bottom-color: var(--cu-border-2);
}

html[data-theme="dark"] .new_section_description .sep_section .sec_heading {
    color: var(--cu-text);
}

html[data-theme="dark"] .new_section_description .sep_section p {
    color: var(--cu-text-2);
}

html[data-theme="dark"] .new_section_description .date_sec i {
    color: var(--cu-primary-hi);
}

html[data-theme="dark"] .new_section_description .date_des label {
    color: var(--cu-text-2);
}

html[data-theme="dark"] .new_section_description .date_des label span {
    color: var(--cu-text-3);
}

html[data-theme="dark"] .new_section_description .sec_label {
    color: var(--cu-text);
}

html[data-theme="dark"] .new_section_description .sec_label span {
    color: var(--cu-text-3);
}

/* "Prodotto inviato": testo + checkbox (img/empty_checkbox.png ha il fondo bianco) */
html[data-theme="dark"] .new_section_description .overall {
    color: var(--cu-text-2);
}

html[data-theme="dark"] .new_section_description img.prd_status[src*="empty_checkbox"] {
    filter: invert(1) hue-rotate(180deg) brightness(1.5);
    mix-blend-mode: screen;
}
