/* ============================================================
   Donations Page Styles
   Matches Free-DC news/stats site aesthetic
   ============================================================ */

/* Intro */
.donation-intro {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
}
.donation-intro p {
    margin: 0 0 8px 0;
}
.donation-intro p:last-child {
    margin-bottom: 0;
}

/* Section headings */
.section-heading {
    font-family: RevueBT, Georgia, serif;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #66A9BD;
    padding-bottom: 6px;
    margin: 24px 0 14px 0;
}

/* ============================================================
   DONATION FORM
   ============================================================ */
.donate-section {
    margin-bottom: 24px;
}
.donate-form-wrap {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 16px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-weight: bold;
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
}
.form-group .optional {
    font-weight: normal;
    color: #888;
    font-size: 11px;
}
.form-help {
    font-size: 11px;
    color: #777;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

/* CPID input row */
.cpid-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.cpid-input-row input {
    flex: 1;
    max-width: 340px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    font-family: monospace;
}
.cpid-input-row button {
    padding: 6px 14px;
    background: #66A9BD;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
}
.cpid-input-row button:hover {
    background: #5598ab;
}

/* CPID result states */
.cpid-result {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 3px;
    font-size: 13px;
}
.cpid-loading {
    color: #666;
    font-style: italic;
}
.cpid-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 8px 10px;
    border-radius: 3px;
}
.cpid-found {
    background: #f0fdf4;
    border: 1px solid #86efac;
    padding: 10px 12px;
    border-radius: 3px;
}
.cpid-name {
    font-size: 15px;
    margin-bottom: 4px;
    color: #166534;
}
.cpid-aliases {
    display: block;
    font-size: 11px;
    color: #555;
    margin-bottom: 8px;
}
.cpid-confirm-row {
    display: flex;
    gap: 8px;
}
.btn-confirm {
    padding: 5px 14px;
    background: #2ea043;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}
.btn-confirm:hover {
    background: #268a39;
}
.btn-decline {
    padding: 5px 14px;
    background: #e5e7eb;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}
.btn-decline:hover {
    background: #d1d5db;
}
.cpid-confirmed {
    background: #f0fdf4;
    border: 1px solid #86efac;
    padding: 8px 10px;
    border-radius: 3px;
    color: #166534;
}
.cpid-confirmed a {
    color: #66A9BD;
    font-size: 11px;
}

/* Name input row */
.name-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.name-input-row input[type="text"] {
    flex: 1;
    max-width: 300px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}
.name-input-row input[type="text"]:disabled {
    background: #f3f4f6;
    color: #999;
}
.anon-label {
    display: flex !important;
    align-items: center;
    gap: 4px;
    font-weight: normal !important;
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

/* Project checkboxes */
.project-checkboxes {
    display: flex;
    gap: 20px;
}
.project-option {
    display: flex !important;
    align-items: center;
    gap: 5px;
    font-weight: normal !important;
    font-size: 13px;
    cursor: pointer;
}

/* Amount row */
.amount-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.amount-btn {
    padding: 6px 16px;
    background: #f3f4f6;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.amount-btn:hover {
    background: #e5e7eb;
}
.amount-btn.selected {
    background: #66A9BD;
    color: #fff;
    border-color: #5598ab;
}
.amount-row input[type="number"] {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

/* Donation type toggle */
.donation-type-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #ccc;
    border-radius: 3px;
    overflow: hidden;
    width: fit-content;
}
.type-btn {
    padding: 7px 18px;
    background: #f3f4f6;
    border: none;
    border-right: 1px solid #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.type-btn:last-child {
    border-right: none;
}
.type-btn:hover {
    background: #e5e7eb;
}
.type-btn.selected {
    background: #66A9BD;
    color: #fff;
}

/* Recurring note */
.recurring-note {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    line-height: 1.4;
}
.recurring-note strong {
    color: #d4a017;
}

/* Message field */
#donorMessage {
    width: 100%;
    max-width: 500px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

/* PayPal button */
.paypal-btn {
    display: inline-block;
    padding: 10px 30px;
    background: #0070ba;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s;
}
.paypal-btn:hover {
    background: #005ea6;
}
.paypal-note {
    font-size: 11px;
    color: #888;
    margin-top: 10px;
    line-height: 1.4;
}

/* Flash messages */
.flash-message.flash-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 10px 14px;
    border-radius: 3px;
    margin: 16px 0;
    font-size: 13px;
}

/* ============================================================
   TRANSPARENCY TABLES
   ============================================================ */
.transparency-section {
    margin-bottom: 20px;
}
.transparency-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.transparency-table th {
    background: #66A9BD;
    color: #fff;
    text-align: left;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: bold;
}
.transparency-table td {
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}
.transparency-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}
.transparency-table tbody tr:hover {
    background: #f0f7fa;
}
.empty-state {
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 13px;
    font-style: italic;
}

/* ============================================================
   SUMMARY CARDS
   ============================================================ */
.summary-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.summary-card {
    flex: 1;
    min-width: 160px;
    padding: 14px 16px;
    border-radius: 4px;
    border: 1px solid #ddd;
    text-align: center;
}
.summary-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.summary-value {
    font-size: 22px;
    font-weight: bold;
    font-family: RevueBT, Georgia, serif;
}
.donations-card {
    background: #f0fdf4;
    border-color: #86efac;
}
.donations-card .summary-value {
    color: #166534;
}
.expenses-card {
    background: #fef2f2;
    border-color: #fca5a5;
}
.expenses-card .summary-value {
    color: #991b1b;
}
.balance-card.positive {
    background: #f0fdf4;
    border-color: #86efac;
}
.balance-card.positive .summary-value {
    color: #166534;
}
.balance-card.negative {
    background: #fef2f2;
    border-color: #fca5a5;
}
.balance-card.negative .summary-value {
    color: #991b1b;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .cpid-input-row {
        flex-direction: column;
        align-items: stretch;
    }
    .cpid-input-row input {
        max-width: 100%;
    }
    .name-input-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .name-input-row input[type="text"] {
        max-width: 100%;
    }
    .amount-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .amount-row .amount-btn {
        width: 100%;
        text-align: center;
    }
    .amount-row input[type="number"] {
        width: 100%;
    }
    .summary-cards {
        flex-direction: column;
    }
    .project-checkboxes {
        flex-direction: column;
        gap: 8px;
    }
    .donation-type-toggle {
        width: 100%;
    }
    .type-btn {
        flex: 1;
        text-align: center;
    }
}

/* ============================================================
   INDEX/TRANSPARENCY PAGE ADDITIONS
   ============================================================ */

/* Donate link in intro */
.donate-link {
    color: #66A9BD;
    font-weight: bold;
    text-decoration: none;
}
.donate-link:hover {
    text-decoration: underline;
}

/* Summary detail line */
.summary-detail {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

/* Recurring tag */
.recurring-tag {
    display: inline-block;
    background: #f0e6ff;
    color: #6b21a8;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Category tag */
.category-tag {
    display: inline-block;
    font-size: 11px;
    color: #555;
}

/* Donor message tooltip icon */
.donor-message {
    cursor: help;
    font-size: 12px;
}

/* Yearly summary table */
.yearly-table td {
    font-size: 13px;
}
.amount-positive {
    color: #166534;
}
.amount-negative {
    color: #991b1b;
}
.count-detail {
    font-size: 10px;
    color: #999;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    font-size: 13px;
}
.pagination a {
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    color: #66A9BD;
    text-decoration: none;
}
.pagination a:hover {
    background: #f0f7fa;
}
.pagination .current {
    padding: 4px 10px;
    background: #66A9BD;
    color: #fff;
    border-radius: 3px;
    font-weight: bold;
}
.pagination .dots {
    padding: 4px 6px;
    color: #999;
}

/* ============================================================
   MONTHLY GOAL PROGRESS BAR
   ============================================================ */
.goal-wrap {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 16px;
}
.goal-bar-container {
    width: 100%;
    height: 28px;
    background: #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 10px;
}
.goal-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #66A9BD, #4a90a4);
    border-radius: 14px;
    transition: width 0.5s ease;
    min-width: 2px;
}
.goal-bar-fill.goal-met {
    background: linear-gradient(90deg, #2ea043, #22863a);
}
.goal-stats {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.goal-raised {
    font-size: 18px;
    font-weight: bold;
    font-family: RevueBT, Georgia, serif;
    color: #333;
}
.goal-target {
    font-size: 13px;
    color: #666;
}
.goal-pct {
    font-size: 13px;
    font-weight: bold;
    color: #66A9BD;
}
.goal-met + .goal-stats .goal-pct {
    color: #2ea043;
}
.goal-details {
    display: flex;
    gap: 24px;
    font-size: 12px;
    color: #555;
    margin-bottom: 8px;
}
.goal-note {
    font-size: 11px;
    color: #999;
    margin: 8px 0 0 0;
    line-height: 1.4;
}

/* Monthly summary table */
.monthly-table td {
    font-size: 13px;
}