/* The tip window - ONE look for every place a tip is sent from (owner
   2026-11-18, "dass die trinkgeld karte immer gleich aussieht. will nicht
   immer alles einzeln ändern"): the sales page, the tip page
   and the cam call all render products/partials/tip-dialog and load
   this file. Change the look here, and only here.

   The window is the cam tip's (owner 2026-11-17/18): dark and compact, the
   brand small and white top left, the range beside "Amount", Apple Pay and
   Google Pay first, then card - crypto - PayPal as pills side by side that
   pay at once, Cancel at the bottom, the green "paid" moment over it.

   Not here, on purpose: where the window sits and how it opens. That comes
   with the page's own wrapper class (.msg-photo-modal on the product pages,
   .vid-modal in the call) - position, z-index, scrolling, [hidden]. */
#tipModal { background: rgba(4, 4, 8, .72); backdrop-filter: blur(4px); }
#tipModal .tip-box { position: relative; box-sizing: border-box; width: min(26rem, 100%); margin: auto 0; padding: 16px 16px 14px; border-radius: 20px; background: #14141b; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 70px rgba(0, 0, 0, .6); color: #f5f5f7; color-scheme: dark; text-align: center; }
#tipModal .tip-brand { position: absolute; top: 19px; left: 16px; margin: 0; font-size: .7rem; font-weight: 800; letter-spacing: .12em; color: #fff; }
#tipModal .tip-title { margin: 0; font-size: 1.1rem; font-weight: 800; color: #f5f5f7; }

#tipModal .tip-amounthead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#tipModal .tip-range { flex: 0 0 auto; color: #b9b9c6; font-size: .78rem; font-weight: 600; white-space: nowrap; }
#tipModal .tip-label { display: block; margin: 8px 0 3px; text-align: left; color: #ececf3; font-size: .82rem; font-weight: 700; }
#tipModal .tip-input,
#tipModal .tip-textarea { display: block; width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: inherit; font: inherit; }
#tipModal .tip-input:focus,
#tipModal .tip-textarea:focus { outline: none; border-color: hsl(258 100% 69%); }
#tipModal .tip-input::placeholder,
#tipModal .tip-textarea::placeholder { color: rgba(245, 245, 247, .45); }
#tipModal .tip-textarea { min-height: 48px; margin-bottom: 0; resize: vertical; }

/* Apple Pay / Google Pay: shown once the device proves the wallet. */
#tipModal .tip-wallets { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; }
#tipModal .tip-wallets[hidden] { display: none; }

/* Card - crypto - PayPal, each paying at once. */
#tipModal .tip-methods { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
/* The saved card pays this amount: the pill reads "One-click pay with card"
   and takes the row to itself, crypto and PayPal under it. */
#tipModal .tip-method.is-one-click { flex: 1 0 100%; white-space: nowrap; }
/* "•••• 4242" behind the words (owner 2026-11-18, "wenns reinpasst"): one
   line on a wide window; on a narrow phone (390 px) the digits go. */
#tipModal .tip-card-digits { font-weight: 700; opacity: .85; }
#tipModal .tip-card-digits[hidden] { display: none; }
@media (max-width: 430px) {
    #tipModal .tip-card-digits { display: none; }
}
#tipModal .tip-methods[hidden],
#tipModal .tip-method[hidden],
#tipModal .tip-paypal[hidden] { display: none; }
#tipModal .tip-method,
#tipModal .tip-paypal { flex: 1 1 0; min-width: 0; height: 44px; margin: 0; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 22px; overflow: hidden; font: inherit; font-size: .92rem; font-weight: 800; cursor: pointer; }
#tipModal .tip-method[data-provider="card"] { border: 0; background: linear-gradient(135deg, hsl(258 100% 69%), hsl(241 100% 40%)); color: #fff; }
#tipModal .tip-method[data-provider="nowpayments"] { border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); color: #f5f5f7; }
#tipModal .tip-method svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#tipModal .tip-method:disabled,
#tipModal .tip-paypal:disabled { opacity: .6; cursor: default; }
/* PayPal's own yellow button, its middle (the logo) in the 44 px. */
#tipModal .tip-paypal { padding: 0; border: 0; background: #ffc439; }
#tipModal .tip-paypal img { display: block; width: auto; max-width: none; height: 100%; }

/* What a payment answers: a plain line (the call) and a refusal (the pages). */
#tipModal .tip-note { margin: 8px 0 0; font-size: .8rem; text-align: left; }
#tipModal .tip-note:empty { margin: 0; }
#tipModal .tip-error { margin: 8px 0 0; font-size: .8rem; font-weight: 600; color: hsl(354 80% 62%); }

/* The one full-width button a step may need: Pay under the address rows,
   the second card processor after a refusal in the call. */
#tipModal .tip-cta { display: block; width: 100%; min-height: 44px; margin: 10px 0 0; padding: 0 16px; border: 0; border-radius: 12px; background: linear-gradient(135deg, hsl(258 100% 69%), hsl(241 100% 40%)); color: #fff; font: inherit; font-size: .95rem; font-weight: 800; cursor: pointer; }
#tipModal .tip-cta[hidden] { display: none; }
#tipModal .tip-cta:disabled { opacity: .55; cursor: not-allowed; }

#tipModal .tip-remove-card { display: block; margin: 12px auto 0; padding: 0; border: 0; background: none; color: rgba(245, 245, 247, .62); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; }
#tipModal .tip-remove-card[hidden] { display: none; }
#tipModal .tip-actions { display: flex; margin-top: 10px; }
#tipModal .tip-cancel { flex: 1; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #f5f5f7; font: inherit; font-size: .95rem; font-weight: 800; cursor: pointer; }

/* On a phone the window starts at the top. */
@media (max-width: 600px) {
    #tipModal { padding-top: 12px; }
    #tipModal > .tip-box { margin: 0 0 auto; }
}

/* The paid moment: the whole window goes green over the form, then the
   window leaves by itself. */
#tipModal .tip-success { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 18px; border-radius: 20px; background: linear-gradient(160deg, #21b35f 0%, #0e8c46 100%); animation: tip-success-in .26s ease-out both; }
#tipModal .tip-success[hidden] { display: none; }
#tipModal .tip-success__badge { position: relative; display: flex; align-items: center; justify-content: center; width: 86px; height: 86px; border-radius: 50%; background: rgba(255, 255, 255, .18); animation: tip-success-pop .5s cubic-bezier(.18, 1.25, .4, 1) both; }
/* The ring that flies off: a reward, not just a confirmation. */
#tipModal .tip-success__badge::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .6); animation: tip-success-ring .85s .18s ease-out both; }
#tipModal .tip-success__check { width: 52px; height: 52px; fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: tip-success-draw .42s .24s ease-out forwards; }
#tipModal .tip-success__text { margin: 0; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.35; animation: tip-success-in .3s .3s ease-out both; }
@keyframes tip-success-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tip-success-pop { 0% { opacity: 0; transform: scale(.4); } 70% { transform: scale(1.12); } 100% { opacity: 1; transform: scale(1); } }
@keyframes tip-success-ring { from { opacity: .85; transform: scale(.8); } to { opacity: 0; transform: scale(1.55); } }
@keyframes tip-success-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
    #tipModal .tip-success,
    #tipModal .tip-success__text,
    #tipModal .tip-success__badge,
    #tipModal .tip-success__badge::after,
    #tipModal .tip-success__check { animation: none; }
    #tipModal .tip-success__check { stroke-dashoffset: 0; }
    #tipModal .tip-success__badge::after { opacity: 0; }
}
