/* ================================================================
   Store MM — My Earnings  (my-earnings.css)
   Palette: #0a0a0a (black) · #c0392b (red) · #ffffff (white)
   ================================================================ */

/* ---- Wrapper ---------------------------------------------------------- */
.smm-earn-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px 56px;
    font-family: inherit;
    color: #1a1a1a;
    box-sizing: border-box;
}
.smm-earn-wrap *, .smm-earn-wrap *::before, .smm-earn-wrap *::after { box-sizing: inherit; }

/* ---- Notice (login / permission) -------------------------------------- */
.smm-earn-notice {
    background: #fff8f8;
    border: 1px solid #f5c6c6;
    border-left: 4px solid #c0392b;
    border-radius: 6px;
    padding: 14px 18px;
    font-size: .9rem;
    color: #1a1a1a;
}
.smm-earn-notice a { color: #c0392b; font-weight: 600; }

/* ---- Product filter notice -------------------------------------------- */
.smm-earn-filter-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f7f7;
    border: 1px solid #e8e8e8;
    border-left: 4px solid #0a0a0a;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: .85rem;
    color: #1a1a1a;
    margin-bottom: 20px;
}
.smm-earn-filter-notice .dashicons { font-size: 16px; width: 16px; height: 16px; color: #6b6b6b; }
.smm-earn-filter-clear {
    margin-left: auto;
    font-size: .78rem;
    font-weight: 700;
    color: #c0392b;
    text-decoration: none;
    border: 1px solid #f5c6c6;
    border-radius: 4px;
    padding: 3px 10px;
}
.smm-earn-filter-clear:hover { background: #ffeaea; }

/* ---- Payout notice ---------------------------------------------------- */
.smm-earn-payout-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fdf4;
    border: 1px solid #b8e8cc;
    border-left: 4px solid #1a7f4b;
    border-radius: 6px;
    padding: 14px 18px;
    font-size: .88rem;
    color: #1a1a1a;
    margin-bottom: 20px;
}
.smm-earn-payout-notice .dashicons { color: #1a7f4b; font-size: 18px; width: 18px; height: 18px; flex-shrink: 0; }

/* ================================================================
   KPI Strip  (5-card flexible grid)
   ================================================================ */
.smm-earn-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.smm-earn-kpi {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.smm-earn-kpi--primary   { border-left: 4px solid #c0392b; background: linear-gradient(135deg, #fff8f8 0%, #fff 60%); }
.smm-earn-kpi--confirmed { border-left: 4px solid #1a7f4b; }
.smm-earn-kpi--pending   { border-left: 4px solid #e67e22; }

.smm-earn-kpi__label {
    font-size: .75rem;
    font-weight: 700;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: .05em;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.smm-earn-kpi__sub {
    font-size: .69rem;
    font-weight: 400;
    color: #9a9a9a;
    text-transform: none;
    letter-spacing: 0;
}

.smm-earn-kpi__value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0a0a0a;
    line-height: 1.1;
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-variant-numeric: tabular-nums;
}

.smm-earn-kpi--primary   .smm-earn-kpi__value { color: #c0392b; }
.smm-earn-kpi--confirmed .smm-earn-kpi__value { color: #1a7f4b; }
.smm-earn-kpi--pending   .smm-earn-kpi__value { color: #e67e22; }

.smm-earn-kpi__currency {
    font-size: .78rem;
    font-weight: 600;
    color: #9a9a9a;
}

.smm-earn-kpi__trend {
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 12px;
    align-self: flex-start;
}
.smm-earn-kpi__trend--up   { background: #e8f7ee; color: #1a7f4b; }
.smm-earn-kpi__trend--down { background: #ffeaea; color: #8b1a1a; }

/* ================================================================
   Sections
   ================================================================ */
.smm-earn-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.smm-earn-section__title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: .78rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.smm-earn-section__title .dashicons {
    color: #c0392b;
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

/* ================================================================
   Monthly Bar Chart
   ================================================================ */
.smm-earn-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 160px;
}

.smm-earn-chart__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.smm-earn-chart__amount {
    font-size: .68rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    line-height: 1.2;
    min-height: 24px;
    display: flex;
    align-items: flex-end;
}

.smm-earn-chart__bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
}

.smm-earn-chart__bar {
    width: 100%;
    background: linear-gradient(180deg, #e05a4e 0%, #c0392b 100%);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: opacity .2s ease;
    cursor: default;
}

.smm-earn-chart__bar:hover { opacity: .75; }

.smm-earn-chart__label {
    font-size: .69rem;
    color: #9a9a9a;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* ================================================================
   Tables
   ================================================================ */
.smm-earn-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.smm-earn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.smm-earn-table th {
    text-align: left;
    font-size: .72rem;
    font-weight: 700;
    color: #8a8a8a;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 8px 12px;
    border-bottom: 2px solid #f0f0f0;
    white-space: nowrap;
    background: #fafafa;
}

.smm-earn-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f7f7f7;
    color: #1a1a1a;
    vertical-align: middle;
}

.smm-earn-table tbody tr:last-child td { border-bottom: none; }
.smm-earn-table tbody tr:hover td { background: #fafafa; }

.smm-earn-table__num  { text-align: right; white-space: nowrap; }
.smm-earn-table__date { color: #9a9a9a; font-size: .79rem; white-space: nowrap; }
.smm-earn-table__pct  { color: #6b6b6b; }
.smm-earn-table__amount { font-weight: 700; color: #0a0a0a; font-variant-numeric: tabular-nums; }
.smm-earn-table__prodnum { font-size: .78rem; color: #8a8a8a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.smm-earn-dash { color: #d0d0d0; }

.smm-earn-table__product a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
}
.smm-earn-table__product a:hover { color: #c0392b; text-decoration: underline; }

.smm-earn-filter-link {
    display: inline-flex;
    align-items: center;
    color: #b0b0b0;
    text-decoration: none;
    margin-left: 4px;
    vertical-align: middle;
    transition: color .15s ease;
}
.smm-earn-filter-link .dashicons { font-size: 13px; width: 13px; height: 13px; }
.smm-earn-filter-link:hover { color: #c0392b; }

.smm-earn-order-link {
    font-weight: 700;
    color: #0a0a0a;
    text-decoration: none;
}
.smm-earn-order-link:hover { color: #c0392b; text-decoration: underline; }

/* ---- Earnings status pills ------------------------------------------- */
.smm-earn-status {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 12px;
    text-transform: capitalize;
    white-space: nowrap;
}
.smm-earn-status--pending   { background: #fff5e0; color: #a05000; }
.smm-earn-status--confirmed { background: #e8f7ee; color: #1a7f4b; }
.smm-earn-status--cancelled { background: #ffeaea; color: #8b1a1a; }
.smm-earn-status--paid      { background: #0a0a0a; color: #fff; }

/* ================================================================
   Empty state
   ================================================================ */
.smm-earn-empty {
    text-align: center;
    padding: 52px 24px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px dashed #d8d8d8;
}

.smm-earn-empty__icon.dashicons {
    font-size: 52px;
    width:  52px;
    height: 52px;
    color: #d0d0d0;
    margin-bottom: 14px;
}

.smm-earn-empty__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.smm-earn-empty__sub {
    font-size: .88rem;
    color: #8a8a8a;
    margin: 0 auto;
    max-width: 420px;
    line-height: 1.6;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 760px) {
    .smm-earn-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .smm-earn-kpi__value { font-size: 1.25rem; }
    .smm-earn-chart { gap: 6px; height: 120px; }
    .smm-earn-chart__amount { font-size: .6rem; }
    .smm-earn-table--transactions th:nth-child(4),
    .smm-earn-table--transactions td:nth-child(4) { display: none; }
}

@media (max-width: 480px) {
    .smm-earn-kpis { grid-template-columns: 1fr; }
    .smm-earn-filter-notice { flex-wrap: wrap; }
    .smm-earn-filter-clear { margin-left: 0; margin-top: 4px; }
}
