/* Fleet shell Bob — fixed FAB + overlay sheet (no layout push on Field Watch) */

.fleet-bob-fab {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 8500;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(167, 78, 158, 0.45);
    background: rgba(22, 22, 27, 0.92);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.fleet-bob-fab[hidden] {
    display: none !important;
}

.fleet-bob-fab-orb {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.fleet-bob-backdrop {
    position: fixed;
    inset: 0;
    z-index: 8550;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.fleet-bob-backdrop[hidden] {
    display: none !important;
}

.fleet-bob-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: min(78dvh, 640px);
    z-index: 8600;
    display: flex;
    flex-direction: column;
    background: var(--bg-color, #0a0a0f);
    border-top: 1px solid var(--border-color, #2a2a35);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.fleet-bob-sheet[hidden] {
    display: none !important;
}

.fleet-bob-sheet-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #2a2a35);
    flex-shrink: 0;
}

.fleet-bob-title {
    font-weight: 600;
    font-size: 16px;
    flex: 1;
    min-width: 0;
}

.fleet-bob-memory {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary, #a0a0b0);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.fleet-bob-memory-input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary, #a74e9e);
    margin: 0;
}

.fleet-bob-new {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-color, #fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.fleet-bob-new svg {
    width: 20px;
    height: 20px;
}

.fleet-bob-new:hover {
    background: rgba(255, 255, 255, 0.06);
}

.fleet-bob-close {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text-color, #fff);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.fleet-bob-transcript {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.fleet-bob-msg {
    display: flex;
}

.fleet-bob-msg--user {
    justify-content: flex-end;
}

.fleet-bob-msg--assistant {
    justify-content: flex-start;
}

.fleet-bob-thinking-row {
    align-items: center;
    gap: 8px;
}

.fleet-bob-thinking-orb {
    flex-shrink: 0;
    line-height: 0;
}

.fleet-bob-bubble {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.fleet-bob-bubble--thinking {
    font-style: italic;
    color: var(--text-secondary, #a0a0b0);
}

.fleet-bob-msg--user .fleet-bob-bubble {
    background: rgba(167, 78, 158, 0.35);
    border: 1px solid rgba(167, 78, 158, 0.5);
}

.fleet-bob-msg--assistant .fleet-bob-bubble {
    background: var(--bg-surface, #16161b);
    border: 1px solid var(--border-color, #2a2a35);
}

.fleet-bob-composer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--border-color, #2a2a35);
    flex-shrink: 0;
}

.fleet-bob-input {
    flex: 1;
    min-height: 44px;
    border-radius: 22px;
    border: 1px solid rgba(167, 78, 158, 0.55);
    background: var(--bg-surface, #16161b);
    color: var(--text-color, #fff);
    padding: 0 14px;
    font-size: 15px;
}

.fleet-bob-input:disabled {
    opacity: 0.6;
}

.fleet-bob-send {
    min-height: 44px;
    min-width: 64px;
    border-radius: 22px;
    border: none;
    background: var(--primary, #a74e9e);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 0 14px;
}

.fleet-bob-send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (min-width: 769px) {
    .fleet-bob-sheet {
        left: auto;
        right: 24px;
        bottom: 24px;
        width: 380px;
        height: 520px;
        border-radius: 16px;
        border: 1px solid var(--border-color, #2a2a35);
    }

    .fleet-bob-fab {
        left: auto;
        right: 24px;
        bottom: 24px;
    }

    .fleet-bob-backdrop {
        background: rgba(0, 0, 0, 0.35);
    }
}
