/* Payment link page (Pages/PayLink.cshtml, /pay/{token}). Colours and type
   come from booking.css (--bk-*), so it matches the booking pages. */
.pay-page {
    box-sizing: border-box;
    width: min(100%, 520px);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(16px, env(safe-area-inset-top)) 16px 24px;
}

.pay-card {
    margin-bottom: 12px;
    padding: 20px;
    border: 1px solid var(--bk-border);
    border-radius: 18px;
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow);
}

.pay-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.pay-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

.pay-header p {
    margin: 2px 0 0;
    color: var(--bk-text-muted);
    font-size: 13px;
}

.pay-mark {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bk-accent);
    color: #fff;
    font-size: 22px;
}

.pay-items {
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.pay-items li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bk-surface-muted);
}

.pay-items strong {
    display: block;
    font-size: 14px;
}

.pay-items span {
    color: var(--bk-text-muted);
    font-size: 12px;
}

.pay-items b {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pay-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 4px 0 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--bk-border-strong);
    font-weight: 600;
}

.pay-total strong {
    color: var(--bk-accent);
    font-size: 26px;
    font-variant-numeric: tabular-nums;
}

.pay-wallets {
    display: grid;
    gap: 8px;
}

.pay-wallet {
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font: 600 15px var(--bk-font);
    cursor: pointer;
}

.pay-wallet[hidden] {
    display: none;
}

.pay-or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    color: var(--bk-text-muted);
    font-size: 12px;
}

.pay-or::before,
.pay-or::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--bk-border);
}

.pay-card-form {
    min-height: 90px;
}

.pay-message {
    min-height: 20px;
    margin: 6px 0 10px;
    color: #b91c1c;
    font-size: 14px;
}

.pay-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    background: var(--bk-accent);
    color: #fff;
    font: 700 17px var(--bk-font);
    cursor: pointer;
}

.pay-button:hover:not(:disabled) {
    background: var(--bk-accent-hover);
}

.pay-button:disabled {
    opacity: .55;
    cursor: default;
}

.pay-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 0;
    color: var(--bk-text-muted);
    font-size: 12px;
    text-align: center;
}

.pay-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 24px 8px;
    text-align: center;
}

.pay-state[hidden] {
    display: none;
}

.pay-state h2 {
    margin: 4px 0 0;
    font-size: 20px;
}

.pay-state p {
    margin: 0;
    color: var(--bk-text-muted);
}

.pay-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 36px;
}

.pay-icon--ok {
    background: #dcfce7;
    color: #15803d;
}

.pay-icon--error {
    background: #fef3c7;
    color: #b45309;
}

.pay-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bk-accent-soft);
    border-top-color: var(--bk-accent);
    border-radius: 50%;
    animation: pay-spin .8s linear infinite;
}

@keyframes pay-spin {
    to { transform: rotate(360deg); }
}

/* Tip */
.pay-tip {
    display: grid;
    gap: 8px;
    margin: 4px 0 12px;
}

.pay-tip-label {
    font-size: 14px;
    font-weight: 600;
}

.pay-tip-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.pay-tip-options button {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 52px;
    padding: 4px 2px;
    border: 1px solid var(--bk-border-strong);
    border-radius: 14px;
    background: var(--bk-surface);
    color: var(--bk-text);
    font: 700 14px var(--bk-font);
    line-height: 1.2;
    cursor: pointer;
}

.pay-tip-options button small {
    color: var(--bk-text-muted);
    font-size: 11px;
    font-weight: 500;
}

.pay-tip-options button.is-active {
    border-color: var(--bk-accent);
    background: var(--bk-accent);
    color: #fff;
}

.pay-tip-options button.is-active small {
    color: rgba(255, 255, 255, .85);
}

.pay-tip-options button:disabled {
    opacity: .6;
    cursor: default;
}

.pay-tip-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--bk-accent);
    border-radius: 999px;
    font-weight: 700;
}

.pay-tip-custom[hidden] {
    display: none;
}

.pay-tip-custom input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font: 600 16px var(--bk-font);
}

.pay-line {
    display: flex;
    justify-content: space-between;
    color: var(--bk-text-muted);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 360px) {
    .pay-tip-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .pay-tip-options {
        gap: 4px;
    }

    .pay-tip-options button {
        border-radius: 12px;
        font-size: 13px;
        letter-spacing: -.01em;
    }

    .pay-tip-options button small {
        font-size: 10px;
    }
}

/* One card per guest: service line, then that therapist's tip. */
.pay-items li.pay-item {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.pay-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pay-item .pay-tip {
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid var(--bk-border);
}

.pay-item .pay-tip-label {
    font-size: 13px;
}

.pay-item .pay-tip-options button {
    min-height: 46px;
    background: var(--bk-surface);
}

.pay-tip-note {
    margin: 0;
    color: var(--bk-accent);
    font-size: 12px;
    font-weight: 600;
}

.pay-tip-note[hidden] {
    display: none;
}

.pay-item .pay-tip-options button.is-active {
    border-color: var(--bk-accent);
    background: var(--bk-accent);
    color: #fff;
}

/* Tips guide buttons: face above, amount below. */
.pay-tip-options button .pay-tip-face {
    font-size: 20px;
    line-height: 1.1;
}

.pay-tip-options button strong {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pay-item .pay-tip-options button {
    min-height: 54px;
}
