/* New Settings Layout (left column + right content) */

.new-settings-layout {
    display: flex;
    gap: 0px; /* reduced by ~1/4 inch (24px) from 16px + existing spacing in wrapper */
    width: 100%;
    align-items: stretch;
    min-height: 100%;

    /* Remove outer padding so the content can sit flush to the wrapper edge */
    padding-left: 0;
    padding-right: 0;

    box-sizing: border-box;
}

/* Grey column behind the settings nav */
.new-settings-left {
    width: 280px;
    min-width: 280px;
    background: #f3f2f1 !important; /* Teams grey */
    border: none !important; /* remove border */
    border-radius: 12px;
    padding: 14px;
    box-shadow: none; /* remove shadow */
    height: 100%;
    position: relative; /* column itself fills height */
}

/* Ensure nav items don't show an outline/border that looks like a column border */
.new-settings-nav-item {
    border: none;
    outline: none;
}

.new-settings-nav-item:hover {
    background: #ffffff;
    border-color: transparent;
}

/* Ensure left nav stacks items in a single column with 3px spacing */
.new-settings-nav {
    display: grid;
    grid-auto-rows: min-content;
    gap: 3px;

    /* Push the settings nav items down (approx. 3 rows) */
    margin-top: 36px;
}

/* Fluent UI style for menu rows */
.new-settings-nav-item {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;

    padding: 10px 12px;
    border-radius: 6px;

    background: transparent;
    border: 1px solid transparent;

    color: #323130;
    text-decoration: none;

    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;

    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;

    /* Removed left accent border */
    border-left: none;
    padding-left: 12px;

    /* No shadow by default */
    box-shadow: none;
}

.new-settings-nav-item i {
    justify-self: center;
    color: #605e5c;
    font-size: 14px;
}

.new-settings-nav-item:hover {
    background: #ffffff;
    border-color: transparent;
    box-shadow: none;
}

.new-settings-nav-item:active {
    background: #e1dfdd;
    box-shadow: none;
}

.new-settings-nav-item.active {
    background: #ffffff;
    border-color: #edebe9;
    color: #0f6cbd;
    border-left-color: transparent;

    /* Fluent-ish shadow only when active */
    box-shadow: 0 3.2px 7.2px rgba(0, 0, 0, 0.10), 0 0.6px 1.8px rgba(0, 0, 0, 0.08);
}

/* Dark mode: active should still be distinct, but not bright blue */
[data-theme="dark"] .new-settings-nav-item.active {
    background: #111827;
    border-color: #374151;
    color: #60a5fa;
    border-left-color: transparent;
}

.new-settings-nav-item.active i {
    color: #0f6cbd;
}

.new-settings-nav-item:focus-visible {
    outline: 2px solid #0f6cbd;
    outline-offset: 2px;
}

/* The inner header/nav should look like it's on the grey column, not a separate white card */
.new-settings-left-header {
    margin-top: 48px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edebe9;
    margin-bottom: 10px;
}

/* Right column should be a Fluent UI card (white background + rounded corners) */
.new-settings-right {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #f0f0f0; /* match dashboard card border */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08); /* match dashboard card shadow */
    overflow: visible; /* allow dropdown overlays to render outside card */
    position: relative; /* anchor in-card dropdown overlays */
}

/* Keep existing dashboard header styles but ensure it doesn't add its own outer rounding */
.new-settings-right .dashboard-header {
    border-radius: 0;
    border-bottom: 1px solid #edebe9;
}

/* New Settings header styling should match dashboard blue */
.new-settings-right .dashboard-header-title {
    color: #0f6cbd !important;
}

.new-settings-right .dashboard-header-icon {
    border: 1px solid rgba(15, 108, 189, 0.35) !important;
    color: #0f6cbd !important;
}

/* Dark mode header divider */
[data-theme="dark"] .new-settings-right .dashboard-header {
    border-bottom-color: #374151;
}

[data-theme="dark"] .new-settings-right .dashboard-header-title {
    color: #f3f4f6;
}

/* Dark mode: keep icon aligned with dashboard blue */
[data-theme="dark"] .new-settings-right .dashboard-header-icon {
    border-color: #374151 !important;
    color: #60a5fa !important;
}

/* Dashboard body should scroll within the right column card */
.new-settings-right .dashboard-body {
    background: transparent;
    overflow: auto;
}

/* Responsive: collapse left nav above content */
@media (max-width: 1100px) {
    .new-settings-layout {
        flex-direction: column;
        padding-left: 0;
        padding-right: 0;
    }

    .new-settings-left {
        width: 100%;
        min-width: 0;
        position: relative;
        top: 0;
    }
}

/* Dark mode */
[data-theme="dark"] .new-settings-left {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .new-settings-title {
    color: #f3f4f6;
}

[data-theme="dark"] .new-settings-subtitle {
    color: #d1d5db;
}

[data-theme="dark"] .new-settings-nav-item {
    color: #f3f4f6;
    box-shadow: none;
}

[data-theme="dark"] .new-settings-nav-item i {
    color: #d1d5db;
}

[data-theme="dark"] .new-settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

[data-theme="dark"] .new-settings-nav-item:active {
    background: rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .new-settings-nav-item.active {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.35);
    color: #60a5fa;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .new-settings-nav-item.active i {
    color: #60a5fa;
}

/* New Settings page: wrapper should match standard dashboard (Patient Services) */
.wip-card-wrapper.new-settings-dashboard-wrapper {
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08) !important;
}

.wip-card-wrapper.new-settings-dashboard-wrapper > .queue-card-content {
    background: var(--white, #ffffff) !important;
    border-radius: 12px !important;
}

/* Keep New Settings inner card styling; the outer wrapper should remain visible */
/* (Removed older overrides that set border/box-shadow to none) */

/* Settings row + Dark mode toggle */

.new-settings-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.new-settings-setting-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.new-settings-setting-title {
    color: #323130;
    font-size: 14px;
    font-weight: 600;
}

.new-settings-setting-subtitle {
    color: #605e5c;
    font-size: 12px;
}

.new-settings-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #d0cccb;
    background: #c8c6c4;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.new-settings-toggle-knob {
    position: absolute;
    top: 50%;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #ffffff;
    transform: translateY(-50%);
    transition: left 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.new-settings-toggle[aria-pressed="true"] {
    background: #0f6cbd;
    border-color: #0f6cbd;
}

.new-settings-toggle[aria-pressed="true"] .new-settings-toggle-knob {
    left: 22px;
}

.new-settings-toggle:focus-visible {
    outline: 2px solid #0f6cbd;
    outline-offset: 2px;
}

[data-theme="dark"] .new-settings-setting-title {
    color: #f3f4f6;
}

[data-theme="dark"] .new-settings-setting-subtitle {
    color: #d1d5db;
}

[data-theme="dark"] .new-settings-toggle {
    border-color: #374151;
    background: #4b5563;
}

[data-theme="dark"] .new-settings-toggle[aria-pressed="true"] {
    background: #60a5fa;
    border-color: #60a5fa;
}

/* ===============================
   NEW SERVICES (gutter) styling
   Match New Settings active row visual treatment
   =============================== */

/* Ensure Services nav items use the same active card treatment as Settings */
body.has-services-gutter .patient-submenu-item.new-services-nav-item.active {
    background: #ffffff;
    border-color: #edebe9;
    color: #0f6cbd;

    /* Fluent-ish shadow only when active */
    box-shadow: 0 3.2px 7.2px rgba(0, 0, 0, 0.10), 0 0.6px 1.8px rgba(0, 0, 0, 0.08);
}

body.has-services-gutter .patient-submenu-item.new-services-nav-item.active i {
    color: #0f6cbd;
}

body.has-services-gutter .patient-submenu-item.new-services-nav-item.active span {
    color: #0f6cbd;
    font-weight: 600;
}

[data-theme="dark"] body.has-services-gutter .patient-submenu-item.new-services-nav-item.active {
    background: #111827;
    border-color: #374151;
    color: #60a5fa;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] body.has-services-gutter .patient-submenu-item.new-services-nav-item.active i,
[data-theme="dark"] body.has-services-gutter .patient-submenu-item.new-services-nav-item.active span {
    color: #60a5fa;
}
