/* ==========================================================================
   MSI Chat Wizard - inline "structured request" card (plan-mode style)
   Shared across chat surfaces via the RCL: served at
   ~/_content/MSI.Core.Portal.Common/chat-wizard.css. Reusable across
   change-request flows; Add Additional Interest is the first.
   ========================================================================== */

:root {
    --wiz-accent: #122F53;   /* navy */
    --wiz-accent-deep: #003468;
    --wiz-tint: #E1EFF2;     /* mist */
    --wiz-ink: #122F53;
    --wiz-muted: #6F8497;
    --wiz-line: #E5E9EE;
    --wiz-danger: #B00020;
    --wiz-ok: #1F8A5B;
}

/* The card spans the full message column, not the bubble width. */
.msi-wiz {
    align-self: stretch;
    flex: 0 0 auto;
    max-width: 100%;
    background: #fff;
    border: 1px solid var(--wiz-line);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(18, 47, 83, 0.08);
    overflow: hidden;
    font-size: 13px;
    color: var(--wiz-ink);
    animation: msi-wiz-in 260ms cubic-bezier(.21,.6,.35,1) both;
}
@keyframes msi-wiz-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

/* ---- Header ------------------------------------------------------------- */
.msi-wiz-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    background: linear-gradient(180deg, rgba(18,47,83,.04), rgba(18,47,83,0));
    border-bottom: 1px solid var(--wiz-line);
}
.msi-wiz-icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 9px;
    display: grid; place-items: center;
    background: var(--wiz-accent);
    color: #fff;
    font-size: 15px;
}
/* Admin's MSIGlobalSite.css sets a global .fa { margin-right: 5px }; override it
   here so the icon stays centered in its fixed-size box. */
.msi-wiz-icon .fa { margin-right: 0; }
.msi-wiz-titles { flex: 1 1 auto; min-width: 0; }
.msi-wiz-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 14px;
    line-height: 1.2;
    color: var(--wiz-ink);
    letter-spacing: -0.2px;
}
.msi-wiz-sub {
    font-size: 11px;
    color: var(--wiz-muted);
    margin-top: 2px;
    letter-spacing: .2px;
}
/* ---- Progress ----------------------------------------------------------- */
.msi-wiz-progress { padding: 0; }
.msi-wiz-bar {
    height: 3px;
    background: #EAF0F4;
    overflow: hidden;
}
.msi-wiz-bar > span {
    display: block;
    height: 100%;
    background: var(--wiz-accent);
    border-radius: 0 3px 3px 0;
    transition: width .32s cubic-bezier(.4,0,.2,1);
}

/* ---- Body --------------------------------------------------------------- */
.msi-wiz-body { padding: 16px 16px 6px; }
.msi-wiz-step-q {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14.5px;
    color: var(--wiz-ink);
    margin: 0 0 3px;
    line-height: 1.3;
    text-wrap: pretty;
}
.msi-wiz-step-help {
    font-size: 12px;
    color: var(--wiz-muted);
    margin: 0 0 13px;
    line-height: 1.45;
}

/* ---- Fields ------------------------------------------------------------- */
.msi-wiz-field { margin-bottom: 13px; }
.msi-wiz-field:last-child { margin-bottom: 4px; }
.msi-wiz-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--wiz-muted);
    margin-bottom: 5px;
}
.msi-wiz-label .req { color: var(--wiz-danger); margin-left: 2px; }
.msi-wiz-hint {
    font-size: 11px;
    color: var(--wiz-muted);
    margin-top: 4px;
    line-height: 1.4;
}
.msi-wiz-input,
.msi-wiz-select {
    width: 100%;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--wiz-ink);
    padding: 9px 11px;
    border: 1.5px solid var(--wiz-line);
    border-radius: 9px;
    background: #fff;
    transition: border-color .14s, box-shadow .14s;
    -webkit-appearance: none;
    appearance: none;
}
.msi-wiz-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236F8497' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 30px;
}
.msi-wiz-input:focus,
.msi-wiz-select:focus {
    outline: none;
    border-color: var(--wiz-accent);
    box-shadow: 0 0 0 3px rgba(18, 47, 83, 0.12);
}
.msi-wiz-input::placeholder { color: #AEBCC8; }
.msi-wiz-field.is-invalid .msi-wiz-input,
.msi-wiz-field.is-invalid .msi-wiz-select {
    border-color: var(--wiz-danger);
    box-shadow: 0 0 0 3px rgba(176, 0, 32, 0.10);
}
.msi-wiz-error {
    display: none;
    font-size: 11px;
    color: var(--wiz-danger);
    margin-top: 5px;
    font-weight: 600;
}
.msi-wiz-field.is-invalid .msi-wiz-error { display: block; }
.msi-wiz-field.is-invalid .msi-wiz-hint { display: none; }

/* address sub-grid */
.msi-wiz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}
.msi-wiz-grid .col-full { grid-column: 1 / -1; }
.msi-wiz-addr {
    margin-top: 4px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .34s ease, opacity .26s ease, margin-top .34s ease;
}
.msi-wiz-addr.open { max-height: 420px; opacity: 1; margin-top: 4px; }

/* ---- Segmented toggle --------------------------------------------------- */
.msi-wiz-seg {
    display: inline-flex;
    flex-wrap: wrap;
    background: #EEF2F5;
    border-radius: 9px;
    padding: 3px;
    gap: 3px;
}
.msi-wiz-seg button {
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--wiz-muted);
    padding: 7px 16px;
    border-radius: 7px;
    cursor: pointer;
    transition: background .14s, color .14s, box-shadow .14s;
}
.msi-wiz-seg button.on {
    background: #fff;
    color: var(--wiz-ink);
    box-shadow: 0 1px 3px rgba(18,47,83,.14);
}

/* ---- Footer ------------------------------------------------------------- */
.msi-wiz-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--wiz-line);
    background: #FBFCFD;
}
.msi-wiz-btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    border-radius: 9px;
    padding: 9px 18px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .14s, color .14s, border-color .14s, opacity .14s;
    display: inline-flex; align-items: center; gap: 7px;
}
.msi-wiz-btn-primary {
    background: var(--wiz-accent);
    color: #fff;
    margin-left: auto;
}
.msi-wiz-btn-primary:hover { background: var(--wiz-accent-deep); }
.msi-wiz-btn-ghost {
    background: transparent;
    color: var(--wiz-muted);
    border-color: var(--wiz-line);
}
.msi-wiz-btn-ghost:hover { color: var(--wiz-ink); border-color: #C7D2DB; }
.msi-wiz-foot-note {
    font-size: 11px;
    color: var(--wiz-muted);
    margin-right: auto;
    display: inline-flex; align-items: center; gap: 5px;
}

/* ---- Review step -------------------------------------------------------- */
.msi-wiz-review { display: flex; flex-direction: column; gap: 0; }
.msi-wiz-rev-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #EEF1F4;
}
.msi-wiz-rev-row:last-child { border-bottom: 0; }
.msi-wiz-rev-k {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--wiz-muted);
    flex-shrink: 0;
    width: 38%;
}
.msi-wiz-rev-v {
    font-size: 13px;
    font-weight: 600;
    color: var(--wiz-ink);
    text-align: right;
    flex: 1 1 auto;
    word-break: break-word;
}
.msi-wiz-rev-v .muted { color: #AEBCC8; font-weight: 500; font-style: italic; }
.msi-wiz-edit {
    border: 0; background: transparent;
    color: var(--wiz-accent);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
    flex-shrink: 0;
}
.msi-wiz-edit:hover { text-decoration: underline; }

/* ---- Submitted / collapsed state --------------------------------------- */
.msi-wiz.is-submitted { box-shadow: 0 4px 14px rgba(31,138,91,.10); }
.msi-wiz.is-submitted .msi-wiz-head {
    background: rgba(31,138,91,.07);
    border-bottom-color: rgba(31,138,91,.18);
}
.msi-wiz.is-submitted .msi-wiz-icon { background: var(--wiz-ok); }
.msi-wiz.is-submitted .msi-wiz-progress,
.msi-wiz.is-submitted .msi-wiz-foot,
.msi-wiz.is-submitted .msi-wiz-edit { display: none; }

/* ==========================================================================
   Dark theme (Admin OmniDebug console loads MSIDarkTheme.css). The card stays
   light for legibility; just deepen the shadow so it sits on the dark surface.
   ========================================================================== */
.dark-theme .msi-wiz {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}
