/* PAYOUTS page: the four summary cards and the payout history, one row per
   transaction with its recipients folded underneath. The shared theme stays
   inline in payouts.html; the logic is in payouts.js. */

/* --- summary cards --- */
.pay-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.4rem 0 1.6rem;
}
.stat-card {
    border: 2px solid var(--border-color);
    background: rgba(255, 255, 255, 0.06);
    padding: 1.1rem 0.9rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}
.stat-card-header {
    font-size: 0.55em;
    letter-spacing: 1.5px;
    color: var(--muted);
    margin-bottom: 0.75rem;
}
.stat-card-body {
    font-size: 0.95em;
    font-weight: bold;
    color: var(--text-color);
    white-space: nowrap;
}
.stat-card-body.gold {
    color: var(--gold);
}
.stat-card-sub {
    margin-top: 0.7rem;
    font-size: 0.5em;
    letter-spacing: 1px;
    color: var(--muted);
    min-height: 1em;
}

/* --- history panel --- */
.pay-panel {
    box-sizing: border-box;
    padding: 1.2rem 1.3rem 1.3rem;
    border: 2px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.pay-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}
.pay-title {
    margin: 0;
    font-size: 0.85em;
    font-weight: normal;
    letter-spacing: 1.5px;
    color: var(--accent-color);
}
.pay-count {
    font-size: 0.5em;
    letter-spacing: 1.5px;
    color: var(--muted);
}
.pay-scroll {
    max-height: max(70vh, 540px);
    overflow: auto;
}

/* --- table: centred cells, chips for the two hashes, gold for money --- */
.retro-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.72em;
}
.retro-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 10px;
    font-size: 0.7em;
    font-weight: normal;
    letter-spacing: 2px;
    text-align: center;
    color: var(--muted);
    background: #15120e;
    border-bottom: 2px solid var(--border-color);
}
.retro-table th.col-time { width: 18%; }
.retro-table th.col-tx { width: 34%; }
.retro-table th.col-amt { width: 17%; }
.retro-table th.col-addr { width: 31%; }
.retro-table td {
    padding: 11px 10px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}
.retro-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.025);
}
.retro-table tbody tr:last-child td {
    border-bottom: 0;
}
.retro-table tr:hover td {
    background: rgba(255, 255, 255, 0.055);
}
.retro-table td.table-message {
    padding: 2rem;
    color: var(--muted);
}
.retro-table td.table-error {
    color: var(--red-soft);
}
.table-error-detail {
    display: block;
    margin-top: 0.6rem;
    font-size: 0.75em;
    color: var(--muted);
}
.td-sub {
    display: block;
    margin-top: 5px;
    font-size: 0.75em;
    color: var(--muted);
}
.pay-amt b {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--gold);
}
/* Rows that pay the wallet this browser has saved */
tr.mine td:first-child {
    box-shadow: inset 3px 0 0 var(--gold);
}
tr.mine td {
    background: rgba(202, 169, 106, 0.06);
}

/* transaction chip: head shrinks with an ellipsis, 8-char tail stays */
.txid-link {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 360px;
    padding: 8px 12px;
    background: rgba(138, 109, 31, 0.08);
    border: 1px solid rgba(138, 109, 31, 0.35);
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 0.5px;
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
a.txid-link:hover {
    background: rgba(138, 109, 31, 0.18);
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(202, 169, 106, 0.55);
    color: var(--accent-color);
}
.txid-link .txh-head {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.txid-link .txh-tail {
    flex: none;
    white-space: nowrap;
}
.txid-link .txh-ext {
    flex: none;
    margin-left: auto;
    padding-left: 10px;
    font-style: normal;
    font-size: 0.85em;
    opacity: 0.6;
}
a.txid-link:hover .txh-ext {
    opacity: 1;
}

/* address: plain mono text, no chip; muted prefix, readable head, the
   recognisable tail in colour */
.addr-cell {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}
.addr-link {
    display: inline-flex;
    align-items: baseline;
    min-width: 0;
    padding: 4px 0;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.25em;
    letter-spacing: 0.3px;
    color: var(--text-color);
    white-space: nowrap;
}
.addr-prefix {
    color: var(--muted);
}
.addr-tail {
    color: var(--gold);
    font-weight: bold;
}
.addr-link.mine .addr-head {
    color: var(--gold);
}
.txid-link {
    margin: 0 auto;
}

/* pending payout: the same pixel status as the blocks page */
.block-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    letter-spacing: 1.5px;
    white-space: nowrap;
    color: var(--gold);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85);
}
.block-status .status-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: currentColor;
    shape-rendering: crispEdges;
}
.block-status .status-icon .sand {
    fill: var(--text-color);
    opacity: 0;
}
.block-status.pending .sand-a { animation: sand-a 2.4s steps(1, end) infinite; }
.block-status.pending .sand-b { animation: sand-b 2.4s steps(1, end) infinite; }
.block-status.pending .sand-c { animation: sand-c 2.4s steps(1, end) infinite; }
@keyframes sand-a { 0% { opacity: 1; } 33.3% { opacity: 0; } }
@keyframes sand-b { 0% { opacity: 0; } 33.3% { opacity: 1; } 66.6% { opacity: 0; } }
@keyframes sand-c { 0% { opacity: 0; } 66.6% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .block-status.pending .sand { animation: none; }
    .block-status.pending .sand-b { opacity: 1; }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
