/*
    Field demo - styles for the demo-only layer (navbar badge, hint strip,
    feedback button, demo modals). Everything else on these pages is the Field app's own
    CSS, copied verbatim. Scoped to demo-* classes so it cannot restyle a real screen.
*/

.demo-nav-badge {
    margin-left: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    line-height: 1;
}

.demo-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 16px 0;
    padding: 10px 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    color: #065f46;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

.demo-hint > i {
    color: #059669;
    font-size: 15px;
    margin-top: 2px;
}

.demo-hint > div {
    flex: 1;
}

.demo-hint-close {
    flex: none;
    width: 30px;
    height: 30px;
    min-height: 30px;
    min-width: 30px;
    margin: -5px -6px -5px 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #047857;
    font-size: 14px;
    cursor: pointer;
}

.demo-hint-close:active {
    transform: scale(0.95);
}

/* The floating Feedback pill sits over the bottom-right corner, which is where every
   page's primary action lands (Finish & Sign Off, Submit, Save Signature). Reserve the
   space so the last button scrolls clear of it. */
body.app-body {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.demo-fab {
    position: fixed;
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    height: 44px;
    border: none;
    border-radius: 22px;
    background: #0f172a;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3);
    cursor: pointer;
}

.demo-fab i {
    font-size: 15px;
    color: #6ee7b7;
}

.demo-fab:active {
    transform: scale(0.97);
}

/* The extinguisher round's Bulk Inspect footer is fixed to the bottom edge at the same
   z-index; the pill rides above it while Bulk mode is on. */
body.fx-bulk .demo-fab {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.demo-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
}

.demo-modal {
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.demo-modal-header {
    padding: 16px 18px 10px;
    border-bottom: 1px solid #f1f5f9;
}

.demo-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.demo-modal-body {
    padding: 14px 18px;
    overflow-y: auto;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.demo-modal-body p {
    margin: 0 0 10px;
}

.demo-modal-body p:last-child {
    margin-bottom: 0;
}

.demo-steps {
    margin: 4px 0 12px;
    padding-left: 22px;
}

.demo-steps li {
    margin-bottom: 4px;
}

.demo-muted {
    color: #64748b;
    font-size: 13px;
}

.demo-link {
    color: #059669;
    font-weight: 600;
    text-decoration: underline;
}

.demo-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 16px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.demo-btn:active {
    transform: scale(0.97);
}

.demo-btn-primary {
    background: #059669;
    color: #fff;
}

.demo-btn-primary:disabled {
    opacity: 0.7;
}

.demo-btn-secondary {
    background: #fff;
    border-color: #e2e8f0;
    color: #475569;
}

.demo-label {
    display: block;
    margin: 10px 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.demo-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: #1e293b;
    background: #fff;
}

.demo-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

textarea.demo-input {
    resize: vertical;
}

@media (min-width: 480px) {
    .demo-hint {
        margin: 12px 20px 0;
    }
}
