/* ============================================================
   Guest Payment Page — guest-pay.css
   ============================================================ */

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gp-container {
    background-color: var(--invoice-background);
}
/* ── Page wrapper ────────────────────────────────────────── */
.gp-page {
    width: 75%;
    padding: 32px 24px 64px;
    font-family: var(--font-family);
    color: var(--color-black);
}

/* ── Page title ──────────────────────────────────────────── */
.gp-heading {
    font-size: 36px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: -0.2px;
    color: var(--color-black);
    margin-bottom: 10px;
}

.gp-subheading {
    font-size: 20px;
    font-weight: 200;
    line-height: 120%;
    letter-spacing: -0.01em;
    color: var(--color-black);
    margin-bottom: 32px;
}

.gp-instruction {
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    color: var(--color-black);
    margin-bottom: 16px;
}

/* ── Service-level alert (mirrors contact-alert pattern) ──── */
.gp-alert {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.gp-alert[aria-hidden="true"] {
    display: none;
}

.gp-alert.v2-alert-danger {
    background: var(--color-alert-bg);
    color: var(--color-alert-text);
    border: none;
}

.gp-alert--unavailable {
    display: block;
    background: var(--color-secondary);
    border-color: var(--color-border);
    color: var(--color-text-muted);
    padding: 10px 16px;
}

.gp-alert__body {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    flex: 1;
}

.gp-alert__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: inherit;
}

.gp-alert__icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.gp-alert__message {
    font-size: 14px;
    font-weight: 400;
    line-height: 150%;
    color: inherit;
    flex: 1;
    margin: 0;
}

.gp-alert__dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    flex-shrink: 0;
}

.gp-alert__dismiss svg {
    width: 18px;
    height: 18px;
    display: block;
}

.gp-alert__dismiss:hover {
    opacity: 0.8;
}

.gp-alert__dismiss:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

/* ── Search row (inline: [Invoice Number] [ZIP] [Button]) ─── */
.gp-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 32px;
}

.gp-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Invoice Number / ZIP width ratio matches Figma 540px / 256px on desktop */
.gp-search-row .gp-field:nth-child(1) { flex: 75 1 256px; min-width: 256px; }
.gp-search-row .gp-field:nth-child(2) { flex: 25 1 256px; min-width: 256px; }
.gp-field--btn { flex: 0 0 auto; }

.gp-captcha-panel {
    margin-top: 16px;
    margin-bottom: 4px;
}

.gp-label--spacer {
    visibility: hidden;
}

.gp-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 150%;
    color: var(--color-text-muted);
}

.gp-label .required-mark {
    color: var(--color-required);
    margin-left: 2px;
}

/* Error state — mirrors .form-group.has-error on contact-us/register */
.gp-field.has-error .gp-label {
    color: var(--color-required);
}

/* ── Input with clear button ──────────────────────────────── */
.gp-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.gp-input {
    width: 100%;
    height: 48px;
    padding: 12px 36px 12px 12px;
    border: 1px solid var(--color-form-border);
    border-radius: 4px;
    font-size: 16px;
    font-family: var(--font-family);
    color: var(--color-black);
    background: var(--color-form-bg);
    box-sizing: border-box;
    transition: border-color var(--transition);
}

.gp-input:hover {
    border-color: var(--color-border-hover);
}

.gp-input:focus {
    outline: 3px solid var(--color-focus-form);
    outline-offset: 2px;
    border-color: var(--color-focus-form);
}

.gp-clear-btn {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-black);
    font-size: 0.75rem;
    border-radius: 50%;
}

.gp-clear-btn:hover { opacity: 0.7; }

/* ── Buttons ─────────────────────────────────────────────── */
.gp-btn-primary {
    height: 48px;
    padding: 12px 16px;
    background: var(--color-primary-btn);
    color: var(--color-login-btn-text);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    line-height: 150%;
    font-family: var(--font-family);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition);
}

.gp-btn-primary:hover:not(:disabled),
.gp-btn-primary:focus-visible:not(:disabled) {
    background: var(--color-primary);
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

.gp-btn-primary:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

/* ── No-results ──────────────────────────────────────────── */
.gp-no-results-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    color: var(--color-black);
    margin-top: 4px;
}

/* ── Results section ─────────────────────────────────────── */
.gp-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.gp-results-heading {
    font-size: 20px;
    font-weight: 600;
    line-height: 120%;
    color: var(--color-black);
    margin: 0;
}

.gp-pay-all-link {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 600;
    line-height: 150%;
    color: var(--color-primary-btn);
    text-decoration: none;
    cursor: pointer;
}

.gp-pay-all-link:hover { text-decoration: underline; }

/* ── Invoice table ───────────────────────────────────────── */
.gp-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--color-link-border);
    border-radius: 4px;
}

.gp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.gp-table thead th {
    background: var(--color-icon-bg);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 14px;
    line-height: 150%;
    padding: 12px 16px;
    text-align: left;
    border: 1px solid var(--color-link-border);
    white-space: nowrap;
}

.gp-table thead th:first-child {
    width: 52px;
    text-align: center;
}

.gp-th-right { text-align: right !important; }

.gp-table tbody tr td {
    border: 1px solid var(--color-link-border);
}

.gp-table tbody tr:hover { background: var(--color-secondary); }

.gp-table td {
    padding: 12px 16px;
    vertical-align: middle;
    color: var(--color-black);
}

.gp-table td:first-child { text-align: right; }

.gp-td-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Paid label */
.gp-paid-label {
    color: var(--color-black);
    font-style: italic;
    font-size: 16px;
}

/* Checkbox */
.gp-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary-btn);
}

.gp-table input[type="checkbox"]:disabled { cursor: default; opacity: 0.38; }

/* ── Total outstanding row (plain block, not a table row) ── */
.gp-total-row {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 8px;
    background: var(--service-background);
    padding: 12px 16px;
    border: 1px solid var(--color-link-border);
    border-top: none;
    box-sizing: border-box;
}

.gp-total-label {
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    color: var(--color-black);
}

.gp-total-amount {
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    color: var(--color-black);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ── Pay actions ─────────────────────────────────────────── */
.gp-pay-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

/* ── Confirmation page ───────────────────────────────────── */
.gp-confirm-card {
    background: var(--color-white);
    border: 1px solid var(--invoice-border);
    border-radius: 8px;
    padding: 28px 32px;
    max-width: 560px;
    margin-top: 24px;
}

.gp-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-icon-bg);
    gap: 16px;
}

.gp-confirm-label {
    font-size: 14px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.gp-confirm-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-black);
    text-align: right;
}

.gp-confirm-notice {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 16px;
    margin-bottom: 0;
}

