/**
 * Affiliate Dashboard Styling - AGGRESSIVE OVERRIDES
 * Forces dark theme on Coupon Affiliates plugin
 */

/* ======================================================= */
/* ===     BASIC CONTAINER & LAYOUT                    === */
/* ======================================================= */

#affiliate-dashboard-content {
    padding: 0 !important;
    background: transparent !important;
}

.affiliate-content {
    padding: 24px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

/* ======================================================= */
/* ===     HIDE PLUGIN HEADER - USE OUR OWN            === */
/* ======================================================= */

.affiliate-content .wt-ca-coupon-name,
.affiliate-content .ca-coupon-name,
.affiliate-content .coupon-name,
.affiliate-content .wt-ca-brand,
.affiliate-content .ca-brand {
    display: none !important;
}

/* ======================================================= */
/* ===     TAB NAVIGATION                              === */
/* ======================================================= */

.affiliate-content .wt_ca_tabs,
.affiliate-content .wt-ca-tabs {
    display: flex !important;
    gap: 0 !important;
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.affiliate-content .wt_ca_tabs li a,
.affiliate-content .wt-ca-tabs li a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    background: #1C69E5 !important;
    color: white !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.affiliate-content .wt_ca_tabs li:first-child a,
.affiliate-content .wt-ca-tabs li:first-child a {
    border-radius: 8px 0 0 8px !important;
}

.affiliate-content .wt_ca_tabs li:last-child a,
.affiliate-content .wt-ca-tabs li:last-child a {
    border-radius: 0 8px 8px 0 !important;
}

.affiliate-content .wt_ca_tabs li:only-child a,
.affiliate-content .wt-ca-tabs li:only-child a {
    border-radius: 8px !important;
}

.affiliate-content .wt_ca_tabs li.active a,
.affiliate-content .wt-ca-tabs li a.active {
    background: #1C69E5 !important;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2) !important;
}

.affiliate-content .wt_ca_tabs li a:hover {
    background: #0993B2 !important;
}

/* ======================================================= */
/* ===     STAT CARDS                                  === */
/* ======================================================= */

.affiliate-content .wt_ca_statistics,
.affiliate-content .wt-ca-statistics {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
}

.affiliate-content .wt_ca_stat_item,
.affiliate-content .wt-ca-stat-item {
    background: #001d3d !important;
    border: 1px solid rgba(28, 105, 229, 0.2) !important;
    border-radius: 12px !important;
    padding: 20px !important;
}

.affiliate-content .wt_ca_stat_item .wt_ca_stat_number,
.affiliate-content .wt-ca-stat-item .wt-ca-stat-number {
    color: white !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
}

.affiliate-content .wt_ca_stat_item .wt_ca_stat_title,
.affiliate-content .wt-ca-stat-item .wt-ca-stat-title {
    color: #cbd5e1 !important;
    font-size: 14px !important;
}

/* ======================================================= */
/* ===     TABLES - AGGRESSIVE DARK THEME              === */
/* ======================================================= */

.affiliate-content table,
.affiliate-content .table,
.affiliate-content .wt-ca-table,
.affiliate-content .ca-table,
.affiliate-content [class*="table"],
.affiliate-content .table-responsive,
.affiliate-content .datatable,
.affiliate-content .data-table {
    width: 100% !important;
    background: #0a1628 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid rgba(28, 105, 229, 0.2) !important;
    border-collapse: collapse !important;
}

.affiliate-content table thead,
.affiliate-content table thead tr,
.affiliate-content .table thead,
.affiliate-content .table thead tr {
    background: #1D2E4E !important;
}

.affiliate-content table th,
.affiliate-content .table th {
    background: #1D2E4E !important;
    color: #cbd5e1 !important;
    padding: 14px 16px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.affiliate-content table td,
.affiliate-content .table td {
    background: transparent !important;
    color: white !important;
    padding: 14px 16px !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.affiliate-content table tr,
.affiliate-content .table tr {
    background: transparent !important;
    border: none !important;
}

.affiliate-content table tbody,
.affiliate-content .table tbody {
    background: transparent !important;
}

.affiliate-content table tr:last-child td,
.affiliate-content .table tr:last-child td {
    border-bottom: none !important;
}

.affiliate-content table tr:hover td,
.affiliate-content .table tr:hover td {
    background: rgba(28, 105, 229, 0.1) !important;
}

/* Table links */
.affiliate-content table a,
.affiliate-content .table a,
.affiliate-content td a {
    color: #cbd5e1 !important;
    text-decoration: none !important;
}

.affiliate-content table a:hover,
.affiliate-content .table a:hover,
.affiliate-content td a:hover {
    color: #1C69E5 !important;
}

/* ======================================================= */
/* ===     BUTTONS                                     === */
/* ======================================================= */

.affiliate-content button,
.affiliate-content .btn {
    background: #1C69E5 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

.affiliate-content button:hover,
.affiliate-content .btn:hover {
    background: #0993B2 !important;
}

/* ======================================================= */
/* ===     FORMS                                       === */
/* ======================================================= */

.affiliate-content input,
.affiliate-content select,
.affiliate-content textarea {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 10px 14px !important;
}

.affiliate-content label {
    color: #cbd5e1 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
}

/* ======================================================= */
/* ===     TEXT COLORS - FORCE LIGHT TEXT              === */
/* ======================================================= */

/* Force ALL text to be white or light */
.affiliate-content,
.affiliate-content *,
.affiliate-content p,
.affiliate-content span,
.affiliate-content div,
.affiliate-content li,
.affiliate-content a {
    color: white !important;
}

.affiliate-content h1,
.affiliate-content h2,
.affiliate-content h3,
.affiliate-content h4,
.affiliate-content h5,
.affiliate-content h6 {
    color: white !important;
}

/* Secondary text - slightly muted but still readable */
.affiliate-content .text-muted,
.affiliate-content small,
.affiliate-content .description,
.affiliate-content .subtitle,
.affiliate-content .help-text,
.affiliate-content .secondary {
    color: #cbd5e1 !important;
}

/* Override any dark text colors from the plugin */
.affiliate-content *[style*="color: #333"],
.affiliate-content *[style*="color: #666"],
.affiliate-content *[style*="color: #999"],
.affiliate-content *[style*="color: black"],
.affiliate-content *[style*="color:#333"],
.affiliate-content *[style*="color:#666"],
.affiliate-content *[style*="color:#999"],
.affiliate-content *[style*="color:black"] {
    color: white !important;
}

/* ======================================================= */
/* ===     HIDE UNWANTED ELEMENTS                      === */
/* ======================================================= */

.affiliate-content .wt-ca-user-info,
.affiliate-content .ca-user-info,
.affiliate-content .user-info,
.affiliate-content .logout-section,
.affiliate-content .back-to-home,
.affiliate-content a[href*="home"]:not(.affiliate-home-btn),
.affiliate-content .wt-ca-logout,
.affiliate-content .ca-logout,
.affiliate-content .wt-ca-brand,
.affiliate-content .ca-brand,
.affiliate-content .brand-section,
.affiliate-content .coupon-brand {
    display: none !important;
}

/* ======================================================= */
/* ===     FORCE TRANSPARENT BACKGROUNDS               === */
/* ======================================================= */

.affiliate-content .wt-ca-wrapper,
.affiliate-content .ca-wrapper,
.affiliate-content .table-wrapper,
.affiliate-content .content-wrapper,
.affiliate-content > div,
.affiliate-content .wt-ca-dashboard,
.affiliate-content .coupon-affiliates {
    background: transparent !important;
}

/* Override any white backgrounds */
.affiliate-content [class*="card"],
.affiliate-content [class*="box"],
.affiliate-content [class*="panel"],
.affiliate-content div[style*="background: white"],
.affiliate-content div[style*="background-color: white"],
.affiliate-content div[style*="background:#fff"],
.affiliate-content div[style*="background-color:#fff"],
.affiliate-content div[style*="background: #fff"],
.affiliate-content div[style*="background-color: #fff"] {
    background: #001d3d !important;
    border: 1px solid rgba(28, 105, 229, 0.2) !important;
    border-radius: 12px !important;
}

/* ======================================================= */
/* ===     RESPONSIVE                                   === */
/* ======================================================= */

@media (max-width: 768px) {
    .affiliate-content {
        padding: 16px !important;
    }
    
    .affiliate-content .wt_ca_statistics,
    .affiliate-content .wt-ca-statistics {
        grid-template-columns: 1fr !important;
    }
    
    .affiliate-content .wt_ca_tabs,
    .affiliate-content .wt-ca-tabs {
        flex-wrap: wrap !important;
    }
}