/* App overrides and Blazor-specific styles. Design system (design-system.css) defines base tokens and components. */

h1:focus {
    outline: none;
}

/* Blazor validation (keep for EditForm) */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--app-success);
}

.invalid {
    outline: 1px solid var(--app-danger);
}

.validation-summary ul {
    margin: 0;
    padding-left: var(--app-space-5);
}

/* Blazor error UI */
#blazor-error-ui {
    color-scheme: light only;
    background: var(--app-warning-muted);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: var(--app-space-2) var(--app-space-4);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: var(--app-space-3);
    top: var(--app-space-2);
}

.blazor-error-boundary {
    background: var(--app-danger);
    padding: var(--app-space-4);
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Blazor loading progress */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--app-border);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--app-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: var(--app-font-semibold);
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: var(--app-text-secondary);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--app-text-muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ----- Billing page ----- */
.app-billing-plan-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--app-space-4);
}

.app-billing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--app-space-4);
}

.app-billing-card {
    position: relative;
    padding: var(--app-space-6);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface);
    display: flex;
    flex-direction: column;
    gap: var(--app-space-3);
}

.app-billing-card-featured {
    border-color: var(--app-primary);
    background: var(--app-primary-muted);
}

.app-billing-card-badge {
    position: absolute;
    top: var(--app-space-2);
    right: var(--app-space-2);
    font-size: var(--app-text-xs);
    font-weight: var(--app-font-semibold);
    color: var(--app-primary);
}

.app-billing-card-title {
    font-weight: var(--app-font-semibold);
    font-size: var(--app-text-lg);
}

.app-billing-card-desc {
    font-size: var(--app-text-sm);
    color: var(--app-text-muted);
}
