/* ============================================================
   FC Donation — Frontend Shortcode Styles
   Themed via fc-theme CSS variables
   ============================================================ */

.fcd-donation-block {
    background: var(--fc-white, #fff);
    border: 1px solid var(--fc-slate-200, #e5e7eb);
    border-radius: var(--fc-radius-md, 12px);
    padding: 24px;
    margin: 20px 0;
    box-shadow: var(--fc-shadow-sm, 0 2px 8px rgba(0,0,0,0.06));
}

.fcd-donation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--fc-green-100, #dcfce7);
}

.fcd-donation-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--fc-green-900, #14532d) !important;
    margin: 0 !important;
}

.fcd-donation-total {
    font-size: 0.95rem;
    color: var(--fc-slate-700, #374151);
}

.fcd-total-amt {
    color: var(--fc-green-600, #16a34a);
    font-size: 1.1rem;
    font-weight: 700;
}

/* ── Year filter ── */
.fcd-year-filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.fcd-year-btn {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid var(--fc-slate-300, #d1d5db);
    border-radius: var(--fc-radius-full, 20px);
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--fc-slate-700, #374151);
    transition: all .15s;
}
.fcd-year-btn:hover {
    border-color: var(--fc-green-600, #16a34a);
    color: var(--fc-green-700, #15803d);
    background: var(--fc-green-50, #f0fdf4);
}
.fcd-year-btn.active {
    background: var(--fc-green-700, #15803d);
    border-color: var(--fc-green-700, #15803d);
    color: var(--fc-white, #fff);
}

/* ── Chart ── */
.fcd-chart-container {
    position: relative;
    width: 100%;
    height: 220px;
    margin-bottom: 20px;
}
.fcd-chart-container canvas {
    max-height: 220px;
}

/* ── Table ── */
.fcd-donation-table-wrap {
    overflow-x: auto;
}

.fcd-donation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.fcd-donation-table th {
    background: var(--fc-slate-50, #f9fafb);
    padding: 8px 14px;
    text-align: left;
    color: var(--fc-slate-500, #6b7280);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid var(--fc-slate-200, #e5e7eb);
}
.fcd-donation-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--fc-slate-100, #f3f4f6);
    color: var(--fc-slate-700, #374151);
}
.fcd-donation-table tr:last-child td { border-bottom: none; }
.fcd-tbl-amount {
    font-weight: 700;
    color: var(--fc-green-600, #16a34a);
}

/* ── No data ── */
.fcd-no-donation {
    padding: 20px;
    text-align: center;
    color: var(--fc-slate-400, #9ca3af);
    font-style: italic;
    background: var(--fc-slate-50, #f9fafb);
    border-radius: var(--fc-radius-sm, 8px);
    border: 1px dashed var(--fc-slate-200, #e5e7eb);
    margin: 12px 0;
}

/* ── JSON output (debug) ── */
.fcd-json-output {
    background: var(--fc-slate-800, #1f2937);
    color: var(--fc-green-100, #d1fae5);
    padding: 16px;
    border-radius: var(--fc-radius-sm, 8px);
    font-size: 0.82rem;
    overflow-x: auto;
}

@media (max-width: 600px) {
    .fcd-donation-header { flex-direction: column; align-items: flex-start; }
    .fcd-chart-container { height: 180px; }
}

/* ── Fee breakdown table ── */
.fcd-fee-table th  {
    background: var(--fc-green-900, #14532d);
    color: var(--fc-white, #fff);
}
.fcd-fee-paid td   { background: var(--fc-green-50, #f0fdf4); }
.fcd-fee-unpaid td { background: #fff7f7; }
.fcd-status-paid   {
    background: var(--fc-green-100, #d1fae5);
    color: var(--fc-green-800, #166534);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.fcd-status-unpaid {
    background: #fee2e2;
    color: #991b1b;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.fcd-due-banner {
    background: var(--fc-yellow-300, #fde047);
    border-left: 4px solid var(--fc-yellow-600, #ca8a04);
    padding: 10px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-weight: 500;
    color: var(--fc-green-950, #052e16);
}
