/* ════════════════════════════════════════════════════
   ReactFlow page  (/flow)
   ════════════════════════════════════════════════════ */

.mobioos-flow-host {
    position: fixed;
    inset: 0;
    top: var(--navbar-height, 44px);
    overflow: hidden;
}

@media (min-width: 641px) {
    .mobioos-flow-host {
        left: 250px;
    }
}

#mobioos-flow-root {
    width: 100%;
    height: 100%;
}

/* ── Data panel ── */
.mobioos-data-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.mobioos-btn-row {
    display: flex;
    gap: 8px;
}

.mobioos-btn {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #e5e5e5;
    background: #fff;
    color: #333;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: all .15s;
}
.mobioos-btn:hover    { background: #f5f5f5; border-color: #ccc; }
.mobioos-btn:disabled { opacity: .5; cursor: default; }

.mobioos-btn--save {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}
.mobioos-btn--save:hover    { background: #1557b0; border-color: #1557b0; }
.mobioos-btn--save:disabled { opacity: .5; cursor: default; }

.mobioos-btn--simulate {
    background: #7b1fa2;
    color: #fff;
    border-color: #7b1fa2;
}
.mobioos-btn--simulate:hover    { background: #6a1792; border-color: #6a1792; }
.mobioos-btn--simulate:disabled { opacity: .5; cursor: default; }

.mobioos-data-output {
    max-width: 360px;
    max-height: 220px;
    overflow: auto;
    background: #1a1a2e;
    color: #a8d8a8;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    font-size: 11px;
    line-height: 1.6;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #2a2a4a;
    white-space: pre;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

/* ── Toast ── */
.mobioos-toast {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    animation: mobioos-fadein .2s ease;
}
.mobioos-toast--ok  { background: #e6f4ea; color: #1e7e34; border: 1px solid #b7dfc1; }
.mobioos-toast--err { background: #fce8e6; color: #c62828; border: 1px solid #f5c6c2; }

/* ── Loader overlay (ReactFlow) ── */
.mobioos-loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: mobioos-fadein .15s ease;
}

.mobioos-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    background: #fff;
    padding: 36px 48px;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.14);
    border: 1px solid #eee;
}

.mobioos-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: mobioos-spin .7s linear infinite;
}

.mobioos-loader-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    letter-spacing: .01em;
}

@keyframes mobioos-fadein {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ════════════════════════════════════════════════════
   Feature Model page  (/feature-model)
   ════════════════════════════════════════════════════ */

.fm-host {
    position: fixed;
    inset: 0;
    top: var(--navbar-height, 44px);
    overflow: hidden;
}

@media (min-width: 641px) {
    .fm-host { left: 250px; }
}

#mobioos-fm-root {
    width: 100%;
    height: 100%;
}

/* ── Loader overlay (FeatureModel) ── */
.fm-loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fm-fadein .15s ease;
}

@keyframes fm-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.fm-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: fm-spin .7s linear infinite;
}

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

/* ── Hint bar ── */
.fm-hints {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 40;
    background: rgba(255,255,255,.88);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 6px 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
    display: flex;
    gap: 14px;
    align-items: center;
}

.fm-hint { font-size: 11px; color: #6b7280; }
.fm-hint kbd {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    font-family: monospace;
    font-size: 10px;
    color: #374151;
    margin: 0 1px;
}
