/* ==========================================================================
   Tip a character — amount picker + her thank-you.
   Same dark/violet aesthetic as scene-studio.css and character-gifts.css.
   ========================================================================== */

.tip-page {
    background: var(--surface-raised);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    padding-bottom: 64px;
}

.tip-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Who you're tipping ---------- */
.tip-hero {
    text-align: center;
    padding: 48px 8px 24px;
    background: radial-gradient(760px 400px at 50% -30%, rgba(124, 124, 124, 0.26), transparent 70%);
}
.tip-avatar {
    width: 96px; height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(124, 124, 124, 0.5);
}
.tip-title {
    font-size: clamp(24px, 4.5vw, 34px);
    font-weight: 800;
    margin: 16px 0 10px;
}
.tip-sub {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.5;
    margin: 0 auto;
    max-width: 460px;
}
.tip-mine {
    margin-top: 14px;
    font-size: 13px;
    color: var(--ink-muted);
}
.tip-mine i { color: var(--ink-muted); }

/* ---------- Amounts ---------- */
.tip-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.tip-amount {
    padding: 14px 8px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    background: var(--veil-strong);
    border: 2px solid rgba(88, 88, 88, 0.16);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.tip-amount:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.tip-amount.is-selected { border-color: var(--line); background: var(--scrim-soft); }
.tip-amount i { color: #a58404; margin-right: 4px; }

/* ---------- Custom amount + note ---------- */
.tip-custom, .tip-note { margin-top: 22px; }
.tip-custom label, .tip-note label {
    display: block;
    font-size: 13px;
    color: var(--ink-muted);
    margin-bottom: 8px;
}
.tip-custom-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    background: var(--veil-strong);
    border: 1px solid rgba(88, 88, 88, 0.16);
    border-radius: 14px;
}
.tip-custom-row i { color: #a58404; }
.tip-custom-row input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--ink);
    font-size: 16px;
    padding: 14px 0;
}
.tip-note textarea {
    width: 100%;
    resize: vertical;
    background: var(--veil-strong);
    border: 1px solid rgba(88, 88, 88, 0.16);
    border-radius: 14px;
    color: var(--ink);
    font-size: 15px;
    padding: 12px 14px;
    outline: none;
    font-family: inherit;
}

/* ---------- Send ---------- */
.tip-send-wrap { text-align: center; margin-top: 26px; }
.tip-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #828282, #7c7c7c);
    border: none;
    color: var(--ink);
    font-weight: 700;
    font-size: 17px;
    padding: 16px 30px;
    border-radius: 16px;
    cursor: pointer;
}
.tip-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tip-send-amount:not(:empty) {
    background: var(--veil);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 15px;
}
.tip-balance { margin-top: 14px; font-size: 14px; color: var(--ink-soft); }
.tip-balance i.bi-coin { color: #a58404; }
.tip-balance-add {
    margin-left: 10px;
    background: none; border: none; color: var(--ink-muted); font-size: 13px; cursor: pointer;
}
.tip-hint { margin-top: 10px; font-size: 13px; color: var(--ink-muted); }

.tip-currency { color: #1c9b4b; font-weight: 700; font-size: 16px; }

/* ---------- Card (Stripe element) ---------- */
.tip-card { margin-top: 22px; }
.tip-card label {
    display: block;
    font-size: 13px;
    color: var(--ink-muted);
    margin-bottom: 8px;
}
.tip-card-element {
    padding: 15px 14px;
    background: var(--veil-strong);
    border: 1px solid rgba(88, 88, 88, 0.16);
    border-radius: 14px;
}
.tip-secure {
    margin-top: 10px;
    font-size: 12px;
    color: var(--ink-disabled);
}

/* ---------- Coin rail (only rendered when coin tips are switched on) ------- */
.tip-coin-block {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(88, 88, 88, 0.14);
}
.tip-or {
    text-align: center;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: 14px;
}
.tip-send-btn-coin {
    display: block;
    width: 100%;
    margin-top: 16px;
    background: var(--scrim-soft);
    border: 1px solid rgba(88, 88, 88, 0.35);
    font-size: 15px;
    padding: 13px 20px;
}

/* ---------- Your tip history ---------- */
.tip-history {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(88, 88, 88, 0.14);
}
.tip-history-header {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-soft);
    margin-bottom: 12px;
}
.tip-history-header i { color: var(--ink-muted); margin-right: 6px; }
.tip-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--veil-strong);
    border: 1px solid rgba(88, 88, 88, 0.1);
    margin-bottom: 8px;
}
.tip-history-name { font-size: 15px; font-weight: 600; }
.tip-history-when { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.tip-history-amount { font-size: 15px; font-weight: 700; color: #1c9b4b; white-space: nowrap; }
.tip-history-empty { font-size: 13px; color: var(--ink-muted); padding: 6px 2px; }

/* ---------- Her thank-you ---------- */
.tip-thanks {
    margin-top: 30px;
    padding: 22px 18px;
    border-radius: 20px;
    background: var(--glass-strong);
    border: 1px solid rgba(88, 88, 88, 0.28);
    text-align: center;
}
.tip-thanks-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(124, 124, 124, 0.5);
}
.tip-thanks-bubble {
    margin: 12px auto 0;
    max-width: 420px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--veil-strong);
    text-align: left;
}
.tip-thanks-name { font-size: 13px; font-weight: 700; color: var(--ink-muted); margin-bottom: 4px; }
.tip-thanks-text { font-size: 15px; line-height: 1.5; color: var(--ink); }
.tip-thanks-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}
.tip-thanks-btn {
    padding: 11px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    color: var(--ink);
    background: var(--glass-strong);
    border: 1px solid rgba(88, 88, 88, 0.2);
}
.tip-thanks-btn-primary { background: linear-gradient(90deg, #828282, #7c7c7c); border: none; }
.tip-thanks-meta { margin-top: 12px; font-size: 12px; color: var(--ink-muted); }

/* ---------- Back link ---------- */
.tip-back { text-align: center; margin-top: 28px; }
.tip-back a { color: var(--ink-muted); font-size: 14px; text-decoration: none; }
.tip-back a:hover { color: var(--ink-muted); }
