/* The admin modal shell (FC.Adm/Components/AIBotAdminModal.razor). One gutter everywhere: 20px on the sides, 16px above
   and below. The body scrolls; the footer stays in view; nothing inside may make the modal wider than itself. */
.fc-aibot-admin-scrim {
    position: fixed;
    inset: 0;
    /* T709: --rz-sidebar-z is 1 in Radzen's themes, not the 1100 this assumed, so the modal sat at 2, under the alerts rail
       (45), the menu and the top bar. The admin's modal level is above all the page chrome (admin-theme.css). */
    z-index: var(--adm-z-modal);
    display: grid;
    place-items: center;
    padding: 2vh 2vw;
    background: var(--fc-scrim);
}

.fc-aibot-admin-modal {
    position: relative;
    left: 0;
    top: 0;
    width: min(1100px, 96vw);
    height: 88vh;
    min-width: min(360px, 96vw);
    min-height: 40vh;
    max-width: 96vw;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
    color: var(--rz-text-color);
    background: var(--adm-surface);
    border: 1px solid var(--adm-line);
    border-radius: 12px;
    box-shadow: var(--fc-shadow-menu);
    outline: none;
}

.fc-aibot-admin-modal-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 10px 20px;
    border-bottom: 1px solid var(--adm-line);
    cursor: move;
    touch-action: none;
    user-select: none;
}

.fc-aibot-admin-modal-body {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding: 16px 20px;
    overflow: auto;
}

.fc-aibot-admin-modal-foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--adm-line);
    background: var(--adm-surface);
}

.fc-aibot-admin-modal-body > .rz-tabview { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.fc-aibot-admin-modal-body .rz-tabview-panels { flex: 1 1 auto; min-height: 0; overflow: auto; }

@media (max-width: 640px) {
    .fc-aibot-admin-scrim { padding: 1vh 1vw; }
    .fc-aibot-admin-modal { width: 98vw; height: 96vh; min-width: 98vw; min-height: 96vh; resize: none; }
    .fc-aibot-admin-modal-body { padding: 12px 14px; }
    .fc-aibot-admin-modal-foot { padding: 10px 14px; }
}

/* FinPrompts query links: Order and Query stay in view while the row scrolls. Order has a fixed width, so Query
   starts exactly where it ends. T709: the width holds Order's # box and a number (it was 5rem, and the number had none). */
.fc-aibot-links-table { --fc-aibot-order-w: 8.5rem; }
.fc-aibot-links-table .fc-aibot-sticky-order, .fc-aibot-links-table .fc-aibot-sticky-query { position:sticky; z-index:2; background:var(--adm-surface); }
.fc-aibot-links-table .fc-aibot-sticky-order { left:0; width:var(--fc-aibot-order-w); min-width:var(--fc-aibot-order-w); max-width:var(--fc-aibot-order-w); }
.fc-aibot-links-table .fc-aibot-sticky-query { left:var(--fc-aibot-order-w); min-width:12rem; }
.fc-aibot-links-table thead .fc-aibot-sticky-order, .fc-aibot-links-table thead .fc-aibot-sticky-query { z-index:3; }
.fc-aibot-links-table td, .fc-aibot-links-table th { min-width:0; }
/* T709: the AIBot drawer's pair rules (Components/AIBotAccountDrawer.razor) fit the drawer at its default width (64vw of a
   1440px window) beside the number fields' units: narrow cell padding, headers that wrap, the stance in a caption size.
   A narrower drawer scrolls the table sideways inside itself (AdmDataTable's .adm-table-scroll). */
.fc-aibot-pairs .adm-table th, .fc-aibot-pairs .adm-table td { padding-inline: .25rem; }
.fc-aibot-pairs .adm-table th { white-space: normal; vertical-align: bottom; }
.fc-aibot-pairs .fc-aibot-pairs-stance { font-size: .75rem; }
