/* Pay app (clients, phones first) and the billing pages' extras. Uses the platform's Bootstrap and
   tokens (platform.css). */
.pay-app {
    --pay: #635bff;
    --pay-dark: #4b45c6;
    --ahp-app: #635bff;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #f6f8fb;
}

.pay-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem;
    background: linear-gradient(180deg, var(--pay), var(--pay-dark));
    color: #fff;
}
.pay-top a { color: inherit; text-decoration: none; }
.pay-top-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); font-size: 1.1rem; }
.pay-top-title { font-weight: 600; line-height: 1.1; }
.pay-top-sub { font-size: .75rem; opacity: .85; }

.pay-main {
    flex: 1 1 auto;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom));
}

.pay-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    justify-content: space-around;
    padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--ahp-border);
    box-shadow: 0 -2px 12px rgba(35, 50, 74, .06);
}
.pay-nav a {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    padding: .35rem 0;
    border-radius: 12px;
    color: var(--ahp-muted);
    font-size: .72rem;
    text-decoration: none;
}
.pay-nav a .bi { font-size: 1.35rem; }
.pay-nav a.active { color: var(--pay); font-weight: 600; background: color-mix(in srgb, var(--pay) 10%, white); }

/* Phones zoom into inputs whose text is under 16px: keep them at 16px. */
.pay-app input, .pay-app textarea, .pay-app select { font-size: 16px !important; }

.pay-hello { margin: .25rem 0 1rem; }
.pay-hello h1 { font-size: 1.35rem; font-weight: 600; margin: 0; }
.pay-hello p { margin: 0; color: var(--ahp-muted); font-size: .9rem; }

.pay-section { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ahp-muted); margin: 1.25rem 0 .5rem; }

.pay-card {
    display: block;
    background: #fff;
    border: 1px solid var(--ahp-border);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: .75rem;
    box-shadow: 0 1px 2px rgba(35, 50, 74, .04);
    color: inherit;
    text-decoration: none;
}
a.pay-card:hover { border-color: color-mix(in srgb, var(--pay) 40%, white); }

.pay-amount { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.pay-muted { color: var(--ahp-muted); font-size: .85rem; }

.pay-lines { width: 100%; font-size: .9rem; }
.pay-lines td { padding: .45rem 0; border-bottom: 1px solid var(--ahp-border); vertical-align: top; }
.pay-lines tr:last-child td { border-bottom: 0; }
.pay-lines td:last-child { text-align: right; white-space: nowrap; padding-left: .75rem; }

.pay-button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .9rem 1rem;
    border: 0;
    border-radius: 12px;
    background: var(--pay);
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
}
.pay-button:disabled { opacity: .6; }

/* Billing pages: fee breakdown of a payment. */
.bill-fees { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; }
.bill-fees > div { background: var(--ahp-bg); border-radius: 10px; padding: .5rem .75rem; }
.bill-fees .label { font-size: .72rem; color: var(--ahp-muted); text-transform: uppercase; letter-spacing: .03em; }
.bill-fees .value { font-weight: 600; }
.bill-lines input.form-control, .bill-lines select.form-select { font-size: .875rem; }
