/* ── EMP Site Builder — global styles ────────────────────────────── */

html, body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}

h1:focus {
    outline: none;
}

/* ── Auth pages (login/register) — centred card layout ─────────── */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ── Loading progress indicator ────────────────────────────────── */

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

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

.loading-progress circle:last-child {
    stroke: #667eea;
    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: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

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

/* ── Error UI ──────────────────────────────────────────────────── */

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: 4px;
}

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

/* ── Mobile responsiveness ────────────────────────────────────── */

/* Stepper: allow horizontal scroll on small screens, prevent header clipping content above */
.mud-stepper .mud-stepper-header {
    overflow-x: auto;
    overflow-y: clip;
    -webkit-overflow-scrolling: touch;
}

/* Reduce main content padding on mobile */
@media (max-width: 600px) {
    .mud-main-content {
        padding: 12px !important;
    }

    /* Compact card actions on mobile */
    .mud-card-actions {
        flex-wrap: wrap;
        gap: 4px;
    }

    /* Gallery caption rows: stack vertically on mobile */
    .gallery-caption-row {
        flex-direction: column;
        align-items: stretch !important;
    }

    .gallery-caption-row img {
        width: 100% !important;
        height: 120px !important;
    }
}

/* ── Image uploader thumbnail grid ────────────────────────────── */

.image-thumb {
    transition: box-shadow 0.2s;
}

.image-thumb:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
