/* Shared presentation for all price-search windows. Channel logic lives in C#.
   Selectors are scoped to price-search classes so other CRM surfaces keep their layout. */
.crm-price-window-backdrop {
    position: fixed; inset: 0; z-index: 6200;
    display: grid; place-items: center; padding: 1rem;
    background: color-mix(in srgb, #111827 54%, transparent);
    backdrop-filter: blur(12px) saturate(1.05);
}
.crm-price-window-backdrop[hidden], .crm-price-workspace[hidden] { display: none !important; }
.crm-price-window {
    --price-accent: #19573e;
    --price-pack: #7b2949; --price-unit: #19573e; --price-currency: #1b4f91;
    position: relative; display: flex; flex-direction: column;
    width: min(1920px, calc(100vw - 32px));
    height: min(1120px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px);
    min-width: 0; overflow: hidden;
    border: 1px solid #87a9d7; border-radius: .75rem;
    color: var(--crm-text, #26332d); background: var(--crm-surface, #fff);
    box-shadow: 0 2rem 6rem rgba(15, 23, 42, .34);
}
.crm-price-window[data-channel="ai"] { --price-accent: #705196; }
.crm-price-window[data-channel="b2b"] { --price-accent: #225991; }
.crm-price-window[data-channel="dot"] { --price-accent: #52618a; }
.crm-price-window-header, .crm-price-window-subject {
    display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between;
    gap: .65rem 1rem; min-width: 0; padding: .65rem .85rem;
    border-bottom: 1px solid var(--crm-border, #d3dae3);
}
.crm-price-window-header { flex-wrap: wrap; background: color-mix(in srgb, #eaf2fd 62%, var(--crm-surface, #fff)); }
.crm-price-window-header h2 { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: 1.1rem; font-weight: 750; color: #173e70; }
.crm-price-window-header .ui-icon { width: 1rem; height: 1rem; }
.crm-price-window-actions, .crm-price-window-options, .crm-price-toolbar {
    display: flex; align-items: center; flex-wrap: wrap; gap: .45rem;
}
.crm-price-window-actions { justify-content: flex-end; }
.crm-price-window .btn, .crm-price-toolbar .btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; white-space: nowrap; }
.crm-price-window-subject > :first-child { min-width: 0; flex: 1 1 auto; }
.crm-price-window-subject strong { display: block; color: #173e70; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-price-window-subject small { color: var(--crm-muted, #536675); }
.crm-price-window-options label { display: inline-flex; align-items: center; gap: .35rem; min-height: 2rem; font-size: .8rem; white-space: nowrap; }
.crm-price-window-options input { width: 1.15rem; height: 1.15rem; margin: 0; }
.crm-price-tabs {
    display: flex; flex: 0 0 auto; align-items: flex-end; gap: .38rem;
    min-height: 3.6rem; padding: .5rem .85rem 0;
    border-bottom: 2px solid #b89453;
    background: linear-gradient(180deg, var(--crm-surface, #fff), #f4efdf);
}
.crm-price-tab {
    --tab-accent: var(--price-accent, #19573e); --tab-tint: #f0f7f2;
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 2.65rem; margin-bottom: -2px; padding: .65rem .85rem;
    border: 1px solid var(--tab-accent); border-bottom-width: 2px;
    border-radius: .65rem .65rem 0 0; background: var(--tab-tint); color: var(--tab-accent);
    font-size: .85rem; font-weight: 750; white-space: nowrap; cursor: pointer;
}
.crm-price-tab .ui-icon { width: 1rem; height: 1rem; }
.crm-price-tab[data-section="diagnostics"] { --tab-accent: #1b4f91; --tab-tint: #eff5fd; }
.crm-price-tab[data-section="log"] { --tab-accent: #946016; --tab-tint: #fff8e8; }
.crm-price-tab[data-section="response"] { --tab-accent: #6b458e; --tab-tint: #f6f0fb; }
.crm-price-tab[data-section="settings"] { --tab-accent: #46576b; --tab-tint: #f2f4f7; }
.crm-price-tab[data-section="brightdata-settings"] { --tab-accent: #246b64; --tab-tint: #eff8f6; }
.crm-price-tab:hover { background: color-mix(in srgb, var(--tab-tint) 70%, #fff0b6); }
.crm-price-tab.active, .crm-price-tab[aria-selected="true"] {
    transform: translateY(-3px); border-width: 2px; border-bottom-width: 3px;
    font-weight: 850; background: color-mix(in srgb, var(--tab-tint) 68%, #fff3a6);
    box-shadow: 0 -4px 12px color-mix(in srgb, var(--tab-accent) 18%, transparent);
}
.crm-price-window-body {
    display: flex; flex-direction: column; flex: 1 1 auto; gap: .5rem;
    min-height: 0; min-width: 0; padding: .5rem .8rem .8rem;
    overflow: auto; overscroll-behavior: contain;
}
.crm-price-window :is(button, a, input, select, summary):focus-visible, .crm-price-search-home :is(button, input, select, summary):focus-visible {
    outline: 2px solid #1b4f91; outline-offset: 3px;
}
.crm-price-window button:disabled, .crm-price-search-home button:disabled { opacity: .5; cursor: not-allowed; }
.crm-price-search-home { display: grid; gap: 1rem; }
.crm-price-search-input { background: var(--crm-surface, #fff); border: 1px solid var(--crm-border, #d3dae3); border-radius: .6rem; padding: .9rem; }
.crm-price-input-primary { display: grid; grid-template-columns: minmax(20rem, 3fr) minmax(12rem, 1fr); gap: .8rem; }
.crm-price-search-input label { display: grid; gap: .3rem; min-width: 0; font-size: .85rem; font-weight: 650; }
.crm-price-search-input .form-control, .crm-price-search-input .form-select { min-width: 0; font-weight: 400; }
.crm-price-input-extra { margin-top: .8rem; }
.crm-price-input-extra summary, .electronics-search-tools > summary { padding: .3rem 0; font-weight: 650; cursor: pointer; }
.crm-price-input-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; margin-top: .7rem; }
.crm-price-input-description { grid-column: 1 / -1; }
.crm-price-input-hint { margin: .7rem 0 0; font-size: .82rem; color: var(--crm-muted, #536675); }
.crm-price-stepper { display: flex; gap: .25rem; }
.crm-price-stepper button { min-width: 2rem; border: 1px solid #a9bfd9; background: #edf4fc; border-radius: .3rem; }
.crm-price-stepper input { text-align: center; }
.electronics-search-tools .crm-price-toolbar { margin: .6rem 0; }
