/* Cromo - transparent layout */
html,body,body.frappe-app,
.page-container,.main-section,
.layout-main,.layout-side-section,
.page-wrapper,.page-content,
.container.page-body,
.desk-sidebar-section,
.layout-main-section-wrapper,
.layout-main-section,
.page-head,.page-header-actions,
.frappe-list,.list-count-sort,
.page-form.row,
.workspace-container,.workspace-section,
.widget-area,.widget-group,
.widget-group-head,.widget-group-body,
.desk-page,.desk-page .page-head,
.widget.dashboard-widget-box,
.widget.shortcut-widget-box,
.widget.spacer,
.widget.links-widget-box,
.widget.custom-block-widget-box,
.widget.custom-block-widget-box .widget-head,
.widget.custom-block-widget-box .widget-footer,
.widget.custom-block-widget-box .widget-body,
.list-sidebar,.overlay-sidebar,
.modules-section .widget,
.module-link-box,.modules-section,
.form-column,.section-body,
.form-section,.form-layout,
.form-page,.page-content.page-form,
.form-tabs-list,.form-tab,.tab-content,
.frappe-card,.comment-box,
.timeline-content,.activity-content,
.desk-sidebar,.standard-sidebar,
.sidebar-section,
.timeline-wrapper,.timeline-item,
.activity-wrapper,.new-timeline,
.timeline-head,.comment-input-wrapper,
.activity-title,.form-footer,
.after-save,.scroll-to-top,
.timeline-items,.timeline-dot {
    background: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* Custom block wrapper - kill everything */
.widget.custom-block-widget-box {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}
.widget.custom-block-widget-box > .widget-head {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.widget.custom-block-widget-box > .widget-footer {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.widget.custom-block-widget-box > .widget-body {
    padding: 0 !important;
}

/* Dropdowns stay visible */
.dropdown-menu {
    background: #ffffff !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
}

/* Mobile sidebar - light theme only.
   This used to be an unguarded white background, which made the sidebar
   unreadable in dark mode: Frappe keeps its light dark-theme text colour and
   it landed on white. Scoped to light, with a matching dark value. */
@media (max-width: 991px) {
    :root:not([data-theme="dark"]) .desk-sidebar,
    :root:not([data-theme="dark"]) .standard-sidebar,
    :root:not([data-theme="dark"]) .list-sidebar,
    :root:not([data-theme="dark"]) .overlay-sidebar {
        background: rgba(255,255,255,0.96) !important;
    }
    [data-theme="dark"] .desk-sidebar,
    [data-theme="dark"] .standard-sidebar,
    [data-theme="dark"] .list-sidebar,
    [data-theme="dark"] .overlay-sidebar {
        background: var(--fg-color, #1c2126) !important;
    }
}

/* Sticky header on mobile */
@media (max-width: 991px) {
    .page-head, .page-header, header.navbar, .navbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
    }
}

/* Form tabs - remove background */
.form-tabs-list,
.form-tabs-list .nav-tabs,
.form-tabs-list .nav-item,
.form-tabs-list .nav-link,
.nav-tabs, .nav-tabs .nav-item,
.nav-tabs .nav-link,
.tab-header, .form-tab-header {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
}

/* Fix dropdown text visibility */
.dropdown-menu,
.dropdown-menu .dropdown-item,
.dropdown-menu li,
.dropdown-menu a,
.dropdown-menu span,
.select-like .like-disabled-select,
.filter-selector,
.sort-selector {
    color: #333333 !important;
}

.dropdown-menu .dropdown-item:hover {
    background: #f5f5f5 !important;
    color: #000000 !important;
}
