/* Matches app loading UI in lib/flutter_flow/nav/nav.dart (FlutterFlowTheme + CustomLoading). */
:root {
    --ff-primary-bg: #f1f4f8;
    --ff-primary: #405eac;
    --ff-secondary-bg: #ffffff;
    --ff-line: #e0e3e7;
    --ff-primary-text: #101213;
    --ff-secondary-text: #57636c;
    --ff-shadow: rgba(64, 94, 172, 0.063);
    --ff-linear-track: rgba(64, 94, 172, 0.078);
    --ff-spinner-track: rgba(64, 94, 172, 0.22);
}

#flutter-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ff-primary-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 1;
    visibility: visible;
    transition: opacity 320ms ease-in-out, visibility 0ms linear 320ms;
    box-sizing: border-box;
}

#flutter-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.loading-shell {
    width: 100%;
    max-width: 420px;
    padding: 0 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loading-logo {
    width: 220px;
    height: 52px;
    object-fit: contain;
    display: block;
}

.loading-card {
    width: 100%;
    margin-top: 28px;
    padding: 22px 20px 18px;
    box-sizing: border-box;
    background: var(--ff-secondary-bg);
    border-radius: 18px;
    border: 1px solid var(--ff-line);
    box-shadow: 0 10px 20px var(--ff-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* CustomLoading: CircularProgressIndicator, strokeWidth 4 */
.loading-circular {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 4px solid var(--ff-spinner-track);
    border-top-color: var(--ff-primary);
    animation: ff-spin 0.85s linear infinite;
}

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

/* titleLarge + FontWeight.w700 */
.loading-title {
    margin: 16px 0 0;
    padding: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ff-primary-text);
}

/* bodyMedium + secondaryText + FontWeight.w600 */
.loading-status-line {
    margin: 8px 0 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ff-secondary-text);
}

/* LinearProgressIndicator minHeight 8, rounded */
.loading-linear-wrap {
    width: 100%;
    height: 8px;
    margin-top: 16px;
    border-radius: 999px;
    background: var(--ff-linear-track);
    overflow: hidden;
}

.loading-linear-bar {
    height: 100%;
    width: 35%;
    border-radius: 999px;
    background: var(--ff-primary);
    animation: ff-linear 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes ff-linear {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(380%); }
}

/* Never set opacity:0 on body — it composites the entire subtree and hides
   #flutter-loading-overlay, which produces a blank white screen during boot. */
html, body {
    height: 100%;
    margin: 0;
    background: var(--ff-primary-bg);
}

body:not(.app-ready) {
    overflow: hidden;
}

/* Match embed surface to loading scaffold so any gap before first Flutter raster
   is not a harsh white/transparent flash (see nav / InitializingScreen background). */
flutter-view,
flt-glass-pane {
    background-color: var(--ff-primary-bg) !important;
}

