/* Moore.io v2 — Light, data-dense EDA tool
   Palette: white bg, black text, blue actions, cyan/fuchsia accents from logo
   Logo gradient: #00D4FF (cyan) → #8B5CF6 (purple) → #C850C0 (fuchsia)
*/

/* === Design tokens === */
:root {
    /* Brand */
    --mio-cyan: #00D4FF;
    --mio-purple: #8B5CF6;
    --mio-fuchsia: #C850C0;
    --mio-gradient: linear-gradient(135deg, #00D4FF, #8B5CF6, #C850C0);

    /* Core palette */
    --mio-blue: #2563EB;
    --mio-blue-hover: #1D4ED8;
    --mio-blue-light: #EFF6FF;
    --mio-black: #111827;
    --mio-white: #FFFFFF;

    /* Grays */
    --mio-gray-50: #F9FAFB;
    --mio-gray-100: #F3F4F6;
    --mio-gray-200: #E5E7EB;
    --mio-gray-300: #D1D5DB;
    --mio-gray-400: #9CA3AF;
    --mio-gray-500: #6B7280;
    --mio-gray-600: #4B5563;
    --mio-gray-700: #374151;
    --mio-gray-800: #1F2937;

    /* Semantic */
    --mio-success: #059669;
    --mio-warning: #D97706;
    --mio-danger: #DC2626;
    --mio-info: #0891B2;

    /* Layout */
    --sidebar-width: 240px;
    --sidebar-collapsed: 56px;
    --topbar-height: 48px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.875rem;
    --text-lg: 1rem;
    --text-xl: 1.125rem;
    --text-2xl: 1.375rem;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    --border: 1px solid var(--mio-gray-200);
}

/* === Dark mode === */
.v2-dark {
    --mio-blue: #3B82F6;
    --mio-blue-hover: #60A5FA;
    --mio-blue-light: #111111;
    --mio-black: #F1F5F9;
    --mio-white: #000000;

    --mio-gray-50: #0A0A0A;
    --mio-gray-100: #111111;
    --mio-gray-200: #222222;
    --mio-gray-300: #333333;
    --mio-gray-400: #888888;
    --mio-gray-500: #999999;
    --mio-gray-600: #CCCCCC;
    --mio-gray-700: #E0E0E0;
    --mio-gray-800: #F0F0F0;

    --mio-success: #34D399;
    --mio-warning: #FBBF24;
    --mio-danger: #F87171;
    --mio-info: #22D3EE;

    --border: 1px solid var(--mio-gray-200);
}

/* Invert all site logos in dark mode */
.v2-dark .v2-logo,
.v2-dark .v2-logo-mark,
.v2-dark .v2-site-logo {
    filter: invert(1) hue-rotate(180deg) brightness(1.3) drop-shadow(0 0 6px rgba(0, 212, 255, 0.4));
}

/* Invert project/IP logos in dark mode (not the MooreIO brand logo) */
.v2-dark .v2-user-logo {
    filter: invert(1) hue-rotate(180deg);
}

/* Dark mode toggle icons — show sun in dark, moon in light */
.v2-dark-icon-moon { display: inline; }
.v2-dark-icon-sun { display: none; }
.v2-dark-label-light { display: inline; }
.v2-dark-label-dark { display: none; }

.v2-dark .v2-dark-icon-moon { display: none; }
.v2-dark .v2-dark-icon-sun { display: inline; }
.v2-dark .v2-dark-label-light { display: none; }
.v2-dark .v2-dark-label-dark { display: inline; }

/* === Reset & base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    color: var(--mio-black);
    background: var(--mio-white);
    overflow: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* === Layout shell === */
.v2-layout {
    display: flex;
    height: calc(100vh - 2px); /* account for accent bar */
    overflow: hidden;
}

/* --- Sidebar --- */
.v2-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: var(--mio-white);
    border-right: var(--border);
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease, min-width 0.2s ease;
    overflow: hidden;
    z-index: 20;
}

.v2-sidebar.collapsed {
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
}

.v2-sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 var(--space-3);
    border-bottom: var(--border);
    flex-shrink: 0;
}

.v2-sidebar-header .v2-logo {
    height: 28px;
    width: auto;
}

.v2-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0;
}

.v2-logo-text {
    font-size: 15px;
    font-weight: 400;
    color: var(--mio-gray-500);
    letter-spacing: 0.15em;
    white-space: nowrap;
}
.v2-logo-mark-link { display: none; }

.v2-sidebar-header .v2-logo-mark {
    height: 28px;
    width: auto;
}

.v2-sidebar.collapsed .v2-logo-link { display: none; }
.v2-sidebar.collapsed .v2-logo-mark-link { display: flex; cursor: pointer; justify-content: center; }
.v2-sidebar.collapsed .v2-sidebar-header { justify-content: center; }

.v2-sidebar-toggle {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--mio-gray-400);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v2-sidebar-toggle:hover {
    color: var(--mio-gray-700);
    background: var(--mio-gray-100);
}

.v2-sidebar.collapsed .v2-sidebar-toggle {
    display: none;
}

.v2-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-2) 0;
}

.v2-nav-section {
    padding: var(--space-2) var(--space-3);
}

.v2-nav-section-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--mio-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-1) var(--space-2);
    white-space: nowrap;
    overflow: hidden;
}

.v2-sidebar.collapsed .v2-nav-section-label {
    visibility: hidden;
    height: 0;
    padding: 0;
}

.v2-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2);
    color: var(--mio-gray-600);
    text-decoration: none;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.1s, color 0.1s;
}

.v2-nav-link:hover {
    background: var(--mio-gray-100);
    color: var(--mio-black);
}

.v2-nav-link.active {
    background: var(--mio-blue-light);
    color: var(--mio-blue);
    font-weight: 500;
}

.v2-nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.v2-nav-icon-org {
    stroke: var(--mio-purple);
}

.v2-nav-section-label-org {
    color: var(--mio-purple);
}

.v2-nav-link span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.v2-sidebar.collapsed .v2-nav-link span { display: none; }
.v2-sidebar.collapsed .v2-nav-link { justify-content: center; padding: var(--space-2); }

.v2-sidebar-footer {
    border-top: var(--border);
    padding: var(--space-2) var(--space-3);
    flex-shrink: 0;
}

/* --- Main area --- */
.v2-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* --- Top bar --- */
.v2-topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 var(--space-5);
    border-bottom: var(--border);
    background: var(--mio-white);
    flex-shrink: 0;
    gap: var(--space-4);
}

.v2-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--mio-gray-500);
    min-width: 0;
}

.v2-breadcrumb a {
    color: var(--mio-gray-500);
    text-decoration: none;
}

.v2-breadcrumb a:hover {
    color: var(--mio-blue);
}

.v2-breadcrumb-sep {
    color: var(--mio-gray-300);
    user-select: none;
}

.v2-breadcrumb-current {
    color: var(--mio-black);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-topbar-spacer { flex: 1; }

.v2-topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.v2-topbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--mio-gray-600);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
}

.v2-topbar-user:hover {
    background: var(--mio-gray-100);
}

.v2-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--mio-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--text-xs);
    font-weight: 600;
}

/* User dropdown */
.v2-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-1);
    background: var(--mio-white);
    border: var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 100;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    min-width: 180px;
    z-index: 50;
    padding: var(--space-1) 0;
}

.v2-dropdown.open { display: block; }

.v2-dropdown a,
.v2-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--mio-gray-700);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}

.v2-dropdown a:hover,
.v2-dropdown button:hover {
    background: var(--mio-gray-50);
    color: var(--mio-black);
}

.v2-dropdown-divider {
    height: 1px;
    background: var(--mio-gray-200);
    margin: var(--space-1) 0;
}

/* --- Content area --- */
.v2-content {
    flex: 1;
    overflow-y: auto;
    background: var(--mio-white);
}

.v2-page {
    max-width: none;
    margin: 0 auto;
    padding: var(--space-6) var(--space-5);
}

.v2-page-wide {
    max-width: none;
    padding: var(--space-5);
}

/* === Page header === */
.v2-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    gap: var(--space-4);
}

.v2-page-title {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--mio-black);
}

.v2-page-subtitle {
    font-size: var(--text-sm);
    color: var(--mio-gray-500);
    margin-top: var(--space-1);
}

.v2-page-actions {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

/* === Cards === */
.v2-card {
    background: var(--mio-white);
    border: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.v2-card + .v2-card {
    margin-top: var(--space-4);
}
/* Grid/flex containers handle their own gap — suppress sibling margin */
[style*="grid"] > .v2-card + .v2-card,
[style*="flex"] > .v2-card + .v2-card {
    margin-top: 0;
}

.v2-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-bottom: var(--border);
    background: var(--mio-gray-50);
}

.v2-card-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--mio-gray-700);
}

.v2-card-body {
    padding: var(--space-4);
}

.v2-card-body-flush {
    padding: 0;
}

/* Filter input for list pages */
.v2-filter-input {
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    border: var(--border);
    border-radius: var(--radius-md);
    background: var(--mio-white);
    color: var(--mio-black);
    width: 220px;
}

.v2-filter-input:focus {
    outline: none;
    border-color: var(--mio-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.v2-filter-input::placeholder {
    color: var(--mio-gray-400);
}

/* Sortable table headers */
.v2-table.v2-sortable thead th {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: var(--space-5);
}

.v2-table.v2-sortable thead th:last-child {
    cursor: default;
}

.v2-table.v2-sortable thead th::after {
    content: '';
    position: absolute;
    right: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-bottom-color: var(--mio-gray-300);
    margin-top: -6px;
}

.v2-table.v2-sortable thead th::before {
    content: '';
    position: absolute;
    right: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-top-color: var(--mio-gray-300);
    margin-top: 2px;
}

.v2-table.v2-sortable thead th.sort-asc::after {
    border-bottom-color: var(--mio-blue);
}

.v2-table.v2-sortable thead th.sort-desc::before {
    border-top-color: var(--mio-blue);
}

/* === Buttons === */
.v2-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-md);
    border: var(--border);
    background: var(--mio-white);
    color: var(--mio-gray-700);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
    line-height: 1.75;
}

.v2-btn:hover {
    background: var(--mio-gray-50);
    border-color: var(--mio-gray-300);
    color: var(--mio-black);
}

.v2-btn-primary {
    background: var(--mio-blue);
    border-color: var(--mio-blue);
    color: var(--mio-white);
}

.v2-btn-primary:hover {
    background: var(--mio-blue-hover);
    border-color: var(--mio-blue-hover);
    color: var(--mio-white);
}

.v2-btn-sm {
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
}


.v2-btn-danger {
    color: var(--mio-danger);
    border-color: var(--mio-danger);
}

.v2-btn-danger:hover {
    background: var(--mio-danger);
    color: var(--mio-white);
}

.v2-btn-sm {
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
}

.v2-btn-icon {
    padding: var(--space-1);
    border: none;
    background: none;
    color: var(--mio-gray-400);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.v2-btn-icon:hover {
    color: var(--mio-gray-700);
    background: var(--mio-gray-100);
}

/* === Tables === */
.v2-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

/* Doc tables use fixed layout so <colgroup> widths are honored,
   giving consistent column alignment across stacked tables. */
.doc-table {
    table-layout: fixed;
}
.doc-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

.v2-table thead th {
    padding: var(--space-2) var(--space-3);
    text-align: left;
    font-weight: 600;
    font-size: var(--text-xs);
    color: var(--mio-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: var(--border);
    background: var(--mio-gray-50);
    white-space: nowrap;
}

.v2-table tbody td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--mio-gray-100);
    color: var(--mio-gray-700);
    vertical-align: middle;
}

.v2-table tbody tr:hover {
    background: var(--mio-gray-50);
}

.v2-table tbody tr:last-child td {
    border-bottom: none;
}

.v2-table-link {
    color: var(--mio-blue);
    text-decoration: none;
    font-weight: 500;
}

.v2-table-link:hover {
    text-decoration: underline;
}

.v2-table-actions {
    display: flex;
    gap: var(--space-1);
}

/* === Forms === */
.v2-form-group {
    margin-bottom: var(--space-4);
}

.v2-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--mio-gray-700);
    margin-bottom: var(--space-1);
}

.v2-input,
.v2-select,
.v2-textarea {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    border: var(--border);
    border-radius: var(--radius-md);
    background: var(--mio-white);
    color: var(--mio-black);
    transition: border-color 0.15s;
}

.v2-input:focus,
.v2-select:focus,
.v2-textarea:focus {
    outline: none;
    border-color: var(--mio-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.v2-input:disabled {
    background: var(--mio-gray-100);
    color: var(--mio-gray-500);
}

.v2-input-error {
    border-color: var(--mio-danger);
}

.v2-error-text {
    font-size: var(--text-xs);
    color: var(--mio-danger);
    margin-top: var(--space-1);
}

.v2-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

/* Multi-column form layout — fields flow into 2 columns, full-width class spans both */
.v2-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2) var(--space-4);
}

.v2-form-grid .v2-form-group {
    margin-bottom: 0;
}

.v2-form-grid .v2-form-full {
    grid-column: 1 / -1;
}

@media only screen and (max-width: 600px) {
    .v2-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Two-panel form layout: left column stacks fields, right column stacks fields */
.v2-form-split {
    display: flex;
    gap: var(--space-5);
}

.v2-form-split > .v2-form-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.v2-form-split > .v2-form-col .v2-form-group {
    margin-bottom: 0;
}

@media only screen and (max-width: 700px) {
    .v2-form-split {
        flex-direction: column;
        gap: var(--space-3);
    }
}

/* === Badges === */
.v2-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px var(--space-2);
    font-size: var(--text-xs);
    font-weight: 500;
    border-radius: 9999px;
    background: var(--mio-gray-100);
    color: var(--mio-gray-600);
}

.v2-badge-blue {
    background: var(--mio-blue-light);
    color: var(--mio-blue);
}

.v2-badge-green {
    background: #ECFDF5;
    color: var(--mio-success);
}

.v2-badge-warning {
    background: #FFFBEB;
    color: var(--mio-warning);
}

.v2-dark .v2-badge-green {
    background: #064E3B;
    color: #6EE7B7;
}

.v2-dark .v2-badge-warning {
    background: #78350F;
    color: #FCD34D;
}

/* === Alerts === */
.v2-alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
    border: 1px solid;
}

.v2-alert-error {
    background: #FEF2F2;
    border-color: #FECACA;
    color: var(--mio-danger);
}

.v2-alert-success {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: var(--mio-success);
}

.v2-alert-info {
    background: var(--mio-blue-light);
    border-color: #BFDBFE;
    color: var(--mio-blue);
}

/* === Tabs === */
.v2-tabs {
    display: flex;
    border-bottom: var(--border);
    gap: 0;
    overflow-x: auto;
}

.v2-tab {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--mio-gray-500);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.1s, border-color 0.1s;
}

.v2-tab:hover {
    color: var(--mio-gray-700);
}

.v2-tab.active {
    color: var(--mio-blue);
    border-bottom-color: var(--mio-blue);
}

.v2-tab-panel {
    display: none;
}

.v2-tab-panel.active {
    display: block;
}

/* === Data-dense utilities === */
.v2-meta {
    font-size: var(--text-xs);
    color: var(--mio-gray-500);
}

.v2-mono {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
}

.v2-kv {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-1) var(--space-4);
    font-size: var(--text-sm);
}

.v2-kv dt {
    color: var(--mio-gray-500);
    font-weight: 500;
    white-space: nowrap;
}

.v2-kv dd {
    color: var(--mio-black);
}

/* === Empty states === */
.v2-empty {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--mio-gray-400);
}

.v2-empty-title {
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--mio-gray-600);
    margin-bottom: var(--space-1);
}

.v2-empty-text {
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

/* === Footer === */
.v2-footer {
    padding: var(--space-3) var(--space-5);
    border-top: var(--border);
    font-size: var(--text-xs);
    color: var(--mio-gray-400);
    text-align: center;
    flex-shrink: 0;
    background: var(--mio-white);
}

.v2-footer a {
    color: var(--mio-gray-400);
    text-decoration: none;
}

.v2-footer a:hover {
    color: var(--mio-gray-600);
}

/* === Accent line (gradient) === */
.v2-accent-bar {
    height: 2px;
    background: var(--mio-gradient);
    flex-shrink: 0;
}

/* === Responsive === */
@media (max-width: 768px) {
    .v2-sidebar {
        position: fixed;
        left: -100%;
        transition: left 0.2s ease;
    }
    .v2-sidebar.mobile-open {
        left: 0;
    }
    .v2-mobile-toggle {
        display: flex;
    }
    .v2-form-row {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .v2-mobile-toggle {
        display: none;
    }
}

/* === UI version toggle === */
.v2-version-toggle {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    z-index: 100;
}

.v2-version-toggle a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--mio-gray-500);
    background: var(--mio-white);
    border: var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.1s;
}

.v2-version-toggle a:hover {
    background: var(--mio-gray-50);
    color: var(--mio-gray-700);
}

/* === Select2 v2 theme overrides === */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
    border: var(--border) !important;
    border-radius: var(--radius-md) !important;
    min-height: 36px !important;
    font-size: var(--text-sm) !important;
    font-family: var(--font-sans) !important;
    background: var(--mio-white) !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--mio-blue-light) !important;
    border: 1px solid var(--mio-blue) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--mio-blue) !important;
    font-size: var(--text-xs) !important;
    padding: 2px 6px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--mio-blue) !important;
    margin-right: 4px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--mio-danger) !important;
}
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--mio-blue) !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1) !important;
}
.select2-dropdown {
    border: var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
    font-size: var(--text-sm) !important;
    font-family: var(--font-sans) !important;
}
.select2-results__option--highlighted[aria-selected] {
    background: var(--mio-blue) !important;
}
.select2-container--default .select2-search--inline .select2-search__field {
    font-size: var(--text-sm) !important;
    font-family: var(--font-sans) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 34px !important;
    padding-left: var(--space-3) !important;
    color: var(--mio-black) !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
}
