/* Donate page (community/donate/). Moved as it was from the inline style of the old page. */

/* Donation method cards */
.donate-methods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.donate-card {
    background: var(--card-bg, #1e1e1e);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 12px;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    transition: border-color 0.2s, transform 0.2s;
}

.donate-card:hover {
    border-color: var(--accent-color, #f5a623);
    transform: translateY(-2px);
}

.donate-card.inactive {
    opacity: 0.65;
    pointer-events: none;
}

.donate-card-icon {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.donate-card-icon.paypal  { color: #009cde; }
.donate-card-icon.patreon { color: #ff424d; }
.donate-card-icon.stripe  { color: #635bff; }

.donate-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.donate-card p {
    font-size: 0.9rem;
    color: var(--text-muted, #aaa);
    margin: 0;
    line-height: 1.5;
}

/* Amount selector */
.amounts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin: 0.5rem 0 1rem;
}

.amount-btn {
    background: transparent;
    border: 2px solid var(--accent-color, #f5a623);
    color: var(--accent-color, #f5a623);
    border-radius: 8px;
    padding: 0.45rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.amount-btn:hover {
    background: var(--accent-color, #f5a623);
    color: #000;
}

.amount-btn.custom { border-style: dashed; }

/* Donate CTA button */
.donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #009cde;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    margin-top: 0.5rem;
}

.donate-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.donate-btn.patreon-btn { background: #ff424d; }
.donate-btn.stripe-btn  { background: #635bff; }

/* Coming soon badge */
.badge-soon {
    display: inline-block;
    background: #333;
    color: #aaa;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

/* Intro block */
.donate-intro {
    max-width: 680px;
    margin: 0 auto 0.5rem;
    text-align: center;
    line-height: 1.7;
    color: var(--text-muted, #ccc);
    font-size: 1rem;
}

/* Stats row */
.donate-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin: 1.25rem 0 0.25rem;
}

.donate-stat { text-align: center; }

.donate-stat strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-color, #f5a623);
    line-height: 1.1;
}

.donate-stat span {
    font-size: 0.8rem;
    color: var(--text-muted, #aaa);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Donors stats row */
.donors-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin: 1.25rem 0 0.5rem;
}

.donors-stat { text-align: center; min-width: 110px; }

.donors-stat strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-color, #f5a623);
    line-height: 1.1;
}

.donors-stat span {
    font-size: 0.78rem;
    color: var(--text-muted, #aaa);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    background: var(--border-color, #2a2a2a);
    align-self: stretch;
}

/* Donations table */
.donors-table-wrap { overflow-x: auto; margin-top: 1rem; }

.donors-table { width: 100%; border-collapse: collapse; }

.donors-table th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #aaa);
    border-bottom: 1px solid var(--border-color, #2a2a2a);
    padding: 0.5rem 0.75rem;
}

.donors-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border-color, #1e1e1e);
    font-size: 0.9rem;
    vertical-align: middle;
}

.donors-table tr:last-child td { border-bottom: none; }

.donors-table .amount-cell {
    font-weight: 700;
    color: var(--accent-color, #f5a623);
    white-space: nowrap;
}

.donors-table .flag {
    width: 20px;
    height: 14px;
    vertical-align: middle;
    margin-right: 6px;
}

.donors-table .donor-name a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Top donors */
.top-donors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.top-donor-card {
    background: var(--card-bg, #1e1e1e);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.top-donor-card .donor-rank {
    font-size: 0.7rem;
    color: var(--text-muted, #666);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.top-donor-card .donor-name-top { font-weight: 700; font-size: 0.95rem; }
.top-donor-card .donor-total { font-size: 0.85rem; color: var(--accent-color, #f5a623); font-weight: 600; }
.top-donor-card .donor-times { font-size: 0.75rem; color: var(--text-muted, #888); }

.donors-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted, #888);
    font-size: 0.9rem;
}

/* Chart */
.chart-wrap { position: relative; margin-top: 1rem; height: 280px; }

/* Data tables (countries, top donors) */
.data-table-wrap { overflow-x: auto; margin-top: 1rem; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #aaa);
    border-bottom: 2px solid var(--border-color, #2a2a2a);
    padding: 0.5rem 0.75rem;
}
.data-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border-color, #1e1e1e);
    font-size: 0.88rem;
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.025); }
.data-table tbody tr:hover td { background: rgba(245,166,35,0.07); }
.data-table .num-cell { font-weight: 700; color: var(--accent-color, #f5a623); }
.data-table .rank-cell { color: var(--text-muted, #666); font-size: 0.8rem; width: 3rem; }
.data-table .times-badge { font-size: 0.75rem; color: var(--text-muted, #888); margin-left: 0.4rem; }
.data-table a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.nth-tag { font-size: 0.75rem; color: var(--text-muted, #888); margin-left: 0.35rem; }

.donors-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.025); }
.donors-table tbody tr:hover td { background: rgba(245,166,35,0.07); }

/* Section cards */
.content-section {
    background: var(--card-bg, #1a1a1a);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
}

/* Merch grid */
.merch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.merch-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg, #1e1e1e);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s;
}

.merch-card:hover {
    border-color: var(--accent-color, #f5a623);
    transform: translateY(-3px);
}

.merch-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #111;
}

.merch-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.merch-card:hover .merch-img-wrap img {
    transform: scale(1.04);
}

.merch-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    gap: 0.5rem;
}

.merch-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.merch-cta {
    font-size: 0.82rem;
    color: var(--accent-color, #f5a623);
    white-space: nowrap;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .merch-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .donate-methods-grid { grid-template-columns: 1fr; }
    .stat-divider { display: none; }
    .merch-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}

/* Destinations: goal progress, items of the goal and the destination tags */
.goal-progress {
    position: relative;
    height: 22px;
    margin: 1rem auto 1.25rem;
    max-width: 680px;
    background: var(--border-color, #2a2a2a);
    border-radius: 11px;
    overflow: hidden;
}

.goal-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f5a623, #e8833a);
    border-radius: 11px;
    transition: width 0.6s ease;
}

.goal-progress-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.goal-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 0.5rem 0 1.25rem;
}

.goal-item {
    flex: 0 1 200px;
    display: flex;
    flex-direction: column;
    background: var(--card-bg, #1e1e1e);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s;
}

a.goal-item:hover {
    border-color: var(--accent-color, #f5a623);
    transform: translateY(-2px);
}

.goal-item-img {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #999;
    font-size: 2.2rem;
}

.goal-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.goal-item-name {
    padding: 0.7rem 0.85rem 0.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
}

.goal-item-price {
    padding: 0 0.85rem 0.8rem;
    margin-top: auto;
    font-weight: 700;
    color: var(--accent-color, #f5a623);
}

.goal-note {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted, #aaa);
}

.dest-cell { white-space: nowrap; }

.dest-tag {
    display: inline-block;
    margin: 0.1rem 0.3rem 0.1rem 0;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted, #ccc);
}

.dest-tag.dest-tokens  { background: rgba(99, 91, 255, 0.18); color: #b3adff; }
.dest-tag.dest-aoostar { background: rgba(245, 166, 35, 0.16); color: #f5a623; }

@media (max-width: 600px) {
    .goal-items { gap: 0.6rem; }
    .goal-item { flex-basis: calc(50% - 0.3rem); }
    .dest-cell { white-space: normal; }
}

/* Affiliate notice, above the items so it is read before the links */
.goal-affiliate {
    max-width: 680px;
    margin: 0 auto 1rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border-color, #2a2a2a);
    border-left: 3px solid var(--accent-color, #f5a623);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted, #ccc);
}

.goal-affiliate i { color: var(--accent-color, #f5a623); margin-right: 0.35rem; }

/* Picture of a goal, uploaded from the panel */
.donate-dest .gold-section-title img.goal-mark { height: 56px; width: auto; max-width: 140px; object-fit: contain; }

/* Transparent pictures of the goals: no white box behind them */
.goal-item-img.is-clear { background: transparent; }
.goal-item.is-bare { background: transparent; border-color: transparent; }

/* The tables of donors keep a fixed height and scroll inside their box, with
   the headings always in sight */
.donors-table-wrap, .data-table-wrap {
    max-height: 480px;
    overflow: auto;
    scrollbar-width: thin;
}
.donors-table th, .data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--card-bg, #1a1a1a);
    box-shadow: inset 0 -1px 0 var(--border-color, #2a2a2a);
}
