/* Hostport shell (authenticated app — not auth.css / login) */

.hostport-main {
    flex: 1;
    overflow: auto;
    min-width: 0;
}

.main-content {
    width: 100%;
    /* max-width: 100% against width: 100% was a no-op, so every page ran full-bleed: at
       2560px the dashboard grid reached 9 columns and stat cards stretched to ~825px around
       a single number. Capping and centring is what gives the app edges. */
    max-width: var(--hp-page-max);
    margin-inline: auto;
    box-sizing: border-box;
    padding: 1.5rem 2rem 2.5rem;
    position: relative;
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem 1rem 2rem;
    }
}

button.pay-option-card {
    display: block;
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 2px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius-sm);
    background: var(--hp-surface);
    font: inherit;
    color: var(--hp-text);
    box-sizing: border-box;
}

button.pay-option-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hp-shadow-sm);
    border-color: var(--hp-border);
}

button.pay-option-card.selected {
    border-color: var(--hp-primary);
    background: var(--hp-primary-muted);
}

.account-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.account-field label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--hp-text-secondary, #cbd5e1);
}

.account-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--hp-border, rgba(110, 146, 192, 0.22));
    border-radius: var(--hp-radius-sm);
    font-size: 1rem;
    background: var(--hp-bg-base, #1e2e47);
    color: var(--hp-text, #f8fafc);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.account-field input:focus {
    outline: none;
    border-color: var(--hp-primary-accent, #a0c7f6);
    box-shadow: var(--hp-focus-ring, 0 0 0 3px rgba(110, 146, 192, 0.25));
}

.account-field input:disabled {
    background: var(--hp-bg-dark, #192332);
    cursor: not-allowed;
    opacity: 0.7;
}

.account-primary-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--hp-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--hp-gradient-primary, linear-gradient(135deg, #6e92c0 0%, #5a7aa9 100%));
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.1s, box-shadow 0.15s;
}

.account-primary-btn:hover:not(:disabled) {
    box-shadow: 0 4px 14px rgba(110, 146, 192, 0.4);
}

.account-primary-btn:disabled {
    opacity: 0.75;
    cursor: wait;
}

.account-inline-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--hp-text);
}

.account-inline-alert.error {
    background: rgba(249, 119, 127, 0.16);
    color: var(--hp-text);
    border: 1px solid rgba(249, 119, 127, 0.35);
    border-inline-start: 3px solid var(--hp-danger);
}

.account-inline-alert.success {
    background: rgba(93, 191, 116, 0.16);
    color: var(--hp-text);
    border: 1px solid rgba(93, 191, 116, 0.35);
    border-inline-start: 3px solid var(--hp-success);
}

.account-inline-alert.info {
    background: rgba(110, 146, 192, 0.22);
    color: var(--hp-text);
    border: 1px solid rgba(110, 146, 192, 0.42);
    border-inline-start: 3px solid var(--hp-primary-accent);
}

.account-inline-alert.warning {
    background: rgba(250, 193, 82, 0.16);
    color: var(--hp-text);
    border: 1px solid rgba(250, 193, 82, 0.35);
    border-inline-start: 3px solid var(--hp-warning);
}

.account-btn-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: account-spin 0.7s linear infinite;
}

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

/* --- crash recovery UX ------------------------------------------------------------------- */

/* Circuit-death banner (#blazor-error-ui is toggled to display:block by blazor.web.js). */
#blazor-error-ui {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    padding: 0.75rem 3rem 0.75rem 1.25rem;
    background: #7f1d1d;
    color: #fff;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.45);
}

#blazor-error-ui .reload {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 1rem;
    top: 0.75rem;
    cursor: pointer;
}

/* HpCrashGuard fallback: inline card for page regions, floating card when it guards the dialog host. */
.hp-crash-guard {
    padding: 1rem 1.25rem;
    border: 1px solid var(--rz-danger, #dc3545);
    border-radius: 8px;
    background: var(--rz-base-background-color, #1a1a1a);
    margin: 1rem 0;
}

.hp-crash-guard-overlay {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    z-index: 10001;
    margin: 0;
    max-width: min(90vw, 40rem);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
