/* Master Structural Anchor Element Layer */
#biz-chat-container {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 99999995 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#biz-chat-launcher {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: move;
    z-index: 99999999 !important;
    user-select: none;
}

#biz-chat-launcher.biz-hidden { display: none !important; opacity: 0 !important; visibility: hidden !important; }
#biz-chat-window.biz-visible { display: flex !important; }

#biz-chat-toggle {
    width: 65px;
    height: 65px;
    background: #0073aa;
    color: #ffffff;
    border-radius: 50%;
    text-align: center;
    line-height: 65px;
    font-size: 30px;
    box-shadow: 0 6px 22px rgba(0,115,170,0.45);
    z-index: 2;
    transition: background 0.2s ease;
}
#biz-chat-launcher:hover #biz-chat-toggle { background: #005984; }

#biz-chat-caption {
    position: absolute;
    bottom: 70px;
    background: #23282d;
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    letter-spacing: 0.4px;
    z-index: 1;
    pointer-events: none;
    animation: bizVaporRise 3.8s infinite linear;
}
#biz-chat-caption::after {
    content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
    border-width: 5px 5px 0 5px; border-style: solid; border-color: #23282d transparent transparent transparent;
}

#biz-chat-window {
    display: none; width: 880px; height: 600px; min-width: 550px; min-height: 450px;
    background: #ffffff; border: 1px solid #ccd0d4; border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.24); position: fixed; bottom: 105px; right: 25px;
    flex-direction: column; overflow: hidden; z-index: 99999997 !important;
}

#biz-chat-header {
    background: #0073aa; color: #ffffff; padding: 14px 18px; font-weight: bold;
    cursor: move; display: flex; justify-content: space-between; align-items: center;
    user-select: none; height: 48px; box-sizing: border-box;
}
.biz-header-title { font-size: 14px; letter-spacing: 0.3px; }
.biz-header-controls { display: flex; gap: 6px; align-items: center; }
.biz-header-controls button {
    background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff; padding: 4px 10px; border-radius: 4px; font-size: 12px; cursor: pointer;
}
.biz-header-controls button:hover { background: rgba(255, 255, 255, 0.3); }
#biz-btn-clear { background: rgba(214, 54, 54, 0.35) !important; border-color: rgba(255,255,255,0.4); }
#biz-btn-clear:hover { background: rgba(214, 54, 54, 0.55) !important; }

#biz-chat-body-layout { display: flex; flex-direction: column; height: calc(100% - 48px); position: relative; background: #ffffff; overflow: hidden; }
#biz-top-section { display: flex; flex-direction: row; flex: 0 0 75%; overflow: hidden; min-height: 0; width: 100%; }

#biz-chat-messages { flex: 0 0 55%; padding: 18px; overflow-y: auto !important; display: flex; flex-direction: column; gap: 12px; background: #f9f9f9; box-sizing: border-box; min-height: 0; }
#biz-action-panel-view { display: flex; flex-direction: column; flex: 0 0 45%; background: #ffffff; overflow: hidden; min-height: 0; }
#biz-action-panel-view.biz-panel-collapsed { display: none !important; }

.biz-action-bar-label { padding: 12px 16px; font-size: 11px; font-weight: bold; text-transform: uppercase; color: #50575e; background: #f0f0f1; border-bottom: 1px solid #dcdcde; letter-spacing: 0.6px; }
#biz-action-dynamic-payload { padding: 18px; overflow-y: auto !important; font-size: 13px; color: #2c3338; flex: 1; min-height: 0; background: #fafafa; }

#biz-chat-footer { flex: 0 0 25%; display: flex; border-top: 1px solid #e1e1e1; background: #ffffff; padding: 12px; gap: 10px; box-sizing: border-box; min-height: 0; }
#biz-chat-input { flex: 1; border: 1px solid #ccd0d4; border-radius: 4px; padding: 10px 12px; font-size: 13.5px; outline: none; resize: none; height: 100%; box-sizing: border-box; font-family: inherit; }
#biz-chat-input:focus { border-color: #0073aa; box-shadow: 0 0 0 1px #0073aa; }
#biz-chat-send { background: #0073aa; color: #ffffff; border: none; padding: 0 22px; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 13px; max-height: 45px; align-self: center; height: 100%; }

#biz-v-splitter { width: 6px; background: #e6e6e6; cursor: col-resize; z-index: 15; transition: background 0.15s; }
#biz-v-splitter:hover, #biz-v-splitter:active { background: #0073aa; }
#biz-h-splitter { height: 6px; background: #e6e6e6; cursor: row-resize; z-index: 15; width: 100%; transition: background 0.15s; }
#biz-h-splitter:hover, #biz-h-splitter:active { background: #0073aa; }

.msg { padding: 10px 14px; border-radius: 6px; max-width: 85%; line-height: 1.45; font-size: 13.5px; word-wrap: break-word; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.user-msg { background: #e2f0fd; color: #1c3d5a; align-self: flex-end; margin-left: auto; }
.ai-msg { background: #ffffff; color: #2c3338; align-self: flex-start; border-left: 3px solid #0073aa; }
.err-msg { background: #fbe9e9; color: #ba1e1e; align-self: flex-start; border-left: 3px solid #d63636; }
#typing-indicator { color: #646c73; font-style: italic; }

.biz-action-alert { background: #ebf5fa; border-left: 3px solid #00a0d2; padding: 12px; border-radius: 4px; color: #2c3338; font-size: 13px; line-height: 1.4; }
.biz-workspace-empty-state { text-align: center; color: #8c959f; margin-top: 40px; }

/* ========================================================================
   HIGH FIDELITY INTUITIVE RFI MODULE LAYOUT COMPONENTS
   ======================================================================== */
.biz-rfi-container { background: #ffffff; border: 1px solid #ccd0d4; border-radius: 6px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.biz-rfi-badge { display: inline-block; background: #46b450; color: #fff; font-size: 10px; font-weight: bold; padding: 3px 8px; border-radius: 12px; margin-bottom: 10px; }
.biz-rfi-intro { font-size: 12.5px; color: #50575e; margin: 0 0 12px 0; line-height: 1.4; }
.biz-rfi-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; font-size: 12px; }
.biz-rfi-table th { background: #f0f0f1; text-align: left; padding: 8px; font-weight: 600; border-bottom: 2px solid #ccd0d4; }
.biz-rfi-table td { padding: 8px; border-bottom: 1px solid #f0f0f1; vertical-align: middle; }
.biz-rfi-input { width: 60px; padding: 4px; border: 1px solid #ccd0d4; border-radius: 4px; text-align: center; font-weight: 600; }
.biz-rfi-submit-btn { width: 100%; background: #46b450; color: white; border: none; padding: 10px; font-weight: bold; border-radius: 4px; cursor: pointer; font-size: 13px; transition: background 0.15s; }
.biz-rfi-submit-btn:hover { background: #349a3b; }

#biz-window-resizer { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 65%, #8c959f 65%); z-index: 1010; }

@keyframes bizVaporRise {
    0% { bottom: 55px; opacity: 0; transform: translateX(-50%) scale(0.7); filter: blur(4px); }
    15% { opacity: 0.9; filter: blur(0px); }
    70% { opacity: 0.8; filter: blur(1px); }
    100% { bottom: 135px; opacity: 0; transform: translateX(-50%) scale(1.2); filter: blur(6px); }
}