/* Tip Jar: Thank-You Wall. Inherits the theme font; colours are variables so a child theme can retint it. */

.rpdo-wall {
    --rpdo-ink: #141414;
    --rpdo-muted: #6f6a60;
    --rpdo-line: rgba(20, 20, 20, .16);
    --rpdo-card: #fff;
    --rpdo-red: #d0231b;
    --rpdo-gold: #9a6c0c;
    --rpdo-gold-soft: #f7e7b4;
    --rpdo-gold-glow: #fdf6df;
    --rpdo-grey-soft: #dedede;
    --rpdo-grey-glow: #f3f3f3;
    color: var(--rpdo-ink);
    line-height: 1.3;
}

.rpdo-wall *,
.rpdo-wall *::before,
.rpdo-wall *::after {
    box-sizing: border-box;
}

/* ---- thank-you note ---- */

.rpdo-wall__intro {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 18px;
}

.rpdo-wall__jar {
    flex: 0 0 auto;
    width: 76px;
    height: auto;
    margin: 0;
}

.rpdo-wall__message {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.4;
}

.rpdo-wall__signature {
    display: block;
    margin-top: 8px;
    font-weight: 700;
    font-style: italic;
}

.rpdo-wall__empty {
    margin: 0;
    color: var(--rpdo-muted);
    font-style: italic;
}

/* ---- list header ---- */

.rpdo-wall__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin: 0 0 12px;
    padding: 10px 8px 9px;
    border-top: 3px solid var(--rpdo-ink);
    border-bottom: 1px solid var(--rpdo-line);
    text-align: center;
}

.rpdo-wall__heading {
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rpdo-wall__subtitle {
    font-size: .74em;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rpdo-muted);
}

/* ---- shared ---- */

.rpdo-wall .rpdo-wall__latest,
.rpdo-wall .rpdo-wall__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rpdo-wall .rpdo-tip {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 0;
}

.rpdo-tip__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rpdo-red);
}

.rpdo-tip__icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.rpdo-tip__times {
    margin-left: 2px;
    font-size: .74em;
    font-weight: 700;
    color: var(--rpdo-red);
    white-space: nowrap;
}

.rpdo-tip__amount {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rpdo-tip--big .rpdo-tip__icon,
.rpdo-tip--top .rpdo-tip__icon {
    color: var(--rpdo-gold);
}

/* ---- the spotlight: latest tippers as cards ---- */

.rpdo-wall .rpdo-wall__latest {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.rpdo-wall .rpdo-tip--card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    background: var(--rpdo-card);
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(20, 20, 20, .08), 0 6px 16px -10px rgba(20, 20, 20, .45);
}

.rpdo-tip--card .rpdo-tip__icon {
    width: 34px;
    height: 34px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(208, 35, 27, .1);
}

.rpdo-tip--card.rpdo-tip--big .rpdo-tip__icon,
.rpdo-tip--card.rpdo-tip--top .rpdo-tip__icon {
    background: var(--rpdo-gold-soft);
}

.rpdo-tip__who {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.rpdo-tip--card .rpdo-tip__name {
    font-size: 1.12em;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.rpdo-tip__flag {
    font-size: .66em;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--rpdo-red);
}

.rpdo-tip__when {
    font-size: .78em;
    color: var(--rpdo-muted);
}

.rpdo-tip--card .rpdo-tip__amount {
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--rpdo-ink);
    color: #fff;
    font-weight: 700;
}

/* the newest one gets the big treatment */

.rpdo-wall .rpdo-tip--newest {
    padding: 14px 14px;
}

.rpdo-tip--newest .rpdo-tip__icon {
    width: 44px;
    height: 44px;
    padding: 10px;
    color: #fff;
    background: var(--rpdo-red);
}

.rpdo-tip--newest .rpdo-tip__name {
    font-size: 1.4em;
    line-height: 1.15;
}

.rpdo-tip--newest .rpdo-tip__amount {
    font-size: 1.15em;
    padding: 5px 13px;
}

.rpdo-tip--newest .rpdo-tip__icon svg {
    animation: rpdo-beat 2.4s ease-in-out infinite;
    transform-origin: center;
}

/* gold cards for the generous ones */

.rpdo-wall .rpdo-tip--card.rpdo-tip--top {
    background: linear-gradient(135deg, var(--rpdo-gold-glow) 0%, var(--rpdo-gold-soft) 100%);
    box-shadow: inset 0 0 0 1px rgba(154, 108, 12, .35), 0 6px 16px -10px rgba(154, 108, 12, .8);
}

.rpdo-tip--newest.rpdo-tip--big .rpdo-tip__icon,
.rpdo-tip--newest.rpdo-tip--top .rpdo-tip__icon {
    color: #fff;
    background: var(--rpdo-gold);
}

.rpdo-tip--card.rpdo-tip--big .rpdo-tip__amount,
.rpdo-tip--card.rpdo-tip--top .rpdo-tip__amount {
    background: var(--rpdo-gold);
}

.rpdo-tip--card.rpdo-tip--big .rpdo-tip__flag,
.rpdo-tip--card.rpdo-tip--top .rpdo-tip__flag {
    color: var(--rpdo-gold);
}

/* ---- the roll: everyone else, name ...... amount ---- */

.rpdo-wall .rpdo-tip--row {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 5px 0;
}

.rpdo-tip--row .rpdo-tip__icon {
    align-self: center;
    width: 13px;
    height: 13px;
    opacity: .85;
}

.rpdo-tip--row .rpdo-tip__name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.rpdo-tip__dots {
    flex: 1 1 12px;
    min-width: 12px;
    border-bottom: 2px dotted var(--rpdo-line);
    transform: translateY(-4px);
}

.rpdo-tip--row.rpdo-tip--big .rpdo-tip__icon,
.rpdo-tip--row.rpdo-tip--top .rpdo-tip__icon {
    width: 16px;
    height: 16px;
    opacity: 1;
}

/* both vanity tiers are a highlighted bar: light grey for the star, gold for the crown */

.rpdo-wall .rpdo-tip--row.rpdo-tip--big,
.rpdo-wall .rpdo-tip--row.rpdo-tip--top {
    margin: 4px -8px;
    padding: 7px 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.06em;
}

.rpdo-wall .rpdo-tip--row.rpdo-tip--big {
    background: linear-gradient(135deg, var(--rpdo-grey-glow) 0%, var(--rpdo-grey-soft) 100%);
    box-shadow: inset 0 0 0 1px rgba(20, 20, 20, .16);
}

.rpdo-tip--row.rpdo-tip--big .rpdo-tip__dots {
    border-bottom-color: rgba(20, 20, 20, .28);
}

.rpdo-wall .rpdo-tip--row.rpdo-tip--top {
    background: linear-gradient(135deg, var(--rpdo-gold-glow) 0%, var(--rpdo-gold-soft) 100%);
    box-shadow: inset 0 0 0 1px rgba(154, 108, 12, .3);
}

.rpdo-tip--row.rpdo-tip--top .rpdo-tip__dots {
    border-bottom-color: rgba(154, 108, 12, .4);
}

.rpdo-tip--row.rpdo-tip--top .rpdo-tip__amount {
    color: #6d4b04;
}

@keyframes rpdo-beat {
    0%, 28%, 100% { transform: scale(1); }
    8% { transform: scale(1.18); }
    16% { transform: scale(.96); }
    22% { transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
    .rpdo-tip--newest .rpdo-tip__icon svg {
        animation: none;
    }
}
