/* Visual audit 2026-10-25: compact discovery and unobstructed mobile controls. */
body.maple-v3.home .maple-search-dock {
  padding: 8px;
}
body.maple-v3.home .maple-search-dock .maple-search-form {
  align-items: stretch;
  gap: 8px;
}
html body.maple-v3.home .maple-search-dock .maple-search-choice,
html body.maple-v3.home .maple-search-dock .maple-search-form > .btn {
  min-height: 52px;
  height: 52px;
  box-sizing: border-box;
  padding-block: 4px;
}
body.maple-v3.home .maple-search-dock .maple-search-choice > span {
  min-width: 0;
}
body.maple-v3.home .maple-search-dock .maple-search-choice b {
  margin: 0;
  font-size: 11px;
  line-height: 14px;
}
body.maple-v3.home .maple-search-dock .maple-search-choice small {
  font-size: 13px;
  line-height: 18px;
}
html body.maple-v3.home .maple-search-dock .aq-native-choice .bootstrap-select {
  height: 26px !important;
  min-height: 26px !important;
}
html body.maple-v3.home .maple-search-dock .aq-native-choice .bootstrap-select > .dropdown-toggle {
  height: 26px !important;
  min-height: 26px !important;
  padding-block: 0 !important;
  font-size: 14px !important;
  line-height: 26px !important;
}
body.maple-v3.home .maple-home-utilities {
  padding: 0;
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}
body.maple-v3.home .maple-home-utilities .v2-type-tabs {
  min-height: 44px;
  height: auto;
  padding-block: 0;
  border: 0;
  background: transparent !important;
  scrollbar-width: none;
}
body.maple-v3.home .maple-home-utilities .v2-type-tabs::-webkit-scrollbar {
  display: none;
}
body.maple-v3.home .maple-home-utilities .v2-type-tabs > a {
  min-height: 44px;
  height: 44px;
  box-sizing: border-box;
}
/* Keep collapse controls away from right-aligned headings and breadcrumbs. */
body.maple-v3 .chrome-toggle.header-toggle {
  right: auto !important;
  left: max(12px, calc((100vw - 1200px) / 2)) !important;
}
/* Houzez positions the wrapper; moving its static child does not move the button. */
body.maple-v3 .back-to-top-wrap {
  right: auto !important;
  left: 12px !important;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
}
body.maple-v3.has-detail .back-to-top-wrap {
  bottom: calc(168px + env(safe-area-inset-bottom, 0px)) !important;
}
body.maple-v3.bottom-hidden .back-to-top-wrap {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
}
body.maple-v3.has-detail.bottom-hidden .back-to-top-wrap {
  bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
}
@media (max-width: 639px) {
  body.maple-v3.home .maple-search-dock {
    padding: 8px;
  }
  body.maple-v3.home .maple-search-dock .maple-search-form {
    gap: 6px;
  }
  html body.maple-v3.home .maple-search-dock .maple-search-choice,
  html body.maple-v3.home .maple-search-dock .maple-search-form > .btn {
    height: 48px;
    min-height: 48px;
  }
  body.maple-v3.home .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
  }
  body.maple-v3.home .section-head > div {
    display: contents;
  }
  body.maple-v3.home .section-head h2 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }
  body.maple-v3.home .section-head p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
  }
  body.maple-v3.home .section-head > .text-link {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    white-space: nowrap;
  }
}
@media (max-width: 900px) {
  body.maple-v3.wpvibe-preview-active .sticky-contact {
    bottom: calc(144px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.maple-v3.wpvibe-preview-active.bottom-hidden .sticky-contact {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Keep the draft notice readable without covering the mobile navigation. */
@media (max-width: 639px) {
  body.maple-v3 #wpvibe-preview-banner {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    height: 64px;
    min-height: 64px;
    padding: 8px;
    box-sizing: border-box;
  }
  body.maple-v3 #wpvibe-preview-banner .wpvibe-info {
    display: none;
  }
  body.maple-v3 #wpvibe-preview-banner .wpvibe-badge {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
  }
  body.maple-v3 #wpvibe-preview-banner .wpvibe-btn {
    flex: 0 0 auto;
    margin: 0;
    padding: 8px;
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
  }
}

/* Selected dashboard navigation must contrast in both themes. */
body.maple-v3 .dashboard-sidebar .sidebar-nav a.active,
body.maple-v3 .dashboard-sidebar .sidebar-nav a[aria-current="page"] {
  color: var(--maple-primary-ink) !important;
  background: var(--maple-primary) !important;
  font-weight: 600;
}
body.maple-v3 .dashboard-sidebar .sidebar-nav a.active :is(span, i),
body.maple-v3 .dashboard-sidebar .sidebar-nav a[aria-current="page"] :is(span, i) {
  color: inherit !important;
}

body.maple-v3 .wp-editor-wrap :is(.mce-tinymce, .mce-panel, .mce-statusbar, .wp-editor-container) {
  color: var(--maple-fg) !important;
  background: var(--maple-card) !important;
  border-color: var(--maple-border) !important;
  box-shadow: none;
}
body.maple-v3 .wp-editor-wrap .mce-statusbar :is(i, span) {
  color: var(--maple-muted);
}

/* Dashboard data panels and status tabs share the active theme palette. */
body.maple-v3.houzez-dashboard-body .houzez-data-content { background: var(--maple-card) !important; color: var(--maple-fg) !important; border-color: var(--maple-border) !important; }
body.maple-v3.houzez-dashboard-body .propertie-list a { color: var(--maple-fg) !important; }
body.maple-v3.houzez-dashboard-body .propertie-list a:hover { background: var(--maple-bg) !important; color: var(--maple-primary) !important; }
body.maple-v3.houzez-dashboard-body .propertie-list a.active { background: var(--maple-primary) !important; color: var(--maple-primary-ink) !important; }
body.maple-v3.houzez-dashboard-body .dashboard-content :is(.houzez-invoice-filter, .bg-light) { background-color: var(--maple-card) !important; color: var(--maple-fg); border-color: var(--maple-border); }
body.maple-v3.houzez-dashboard-body .dashboard-content .accordion-button { background: var(--maple-card) !important; color: var(--maple-fg) !important; }
body.maple-v3.houzez-dashboard-body .dashboard-content .accordion-button:not(.collapsed) { background: var(--maple-bg) !important; color: var(--maple-primary) !important; }
body.maple-v3.houzez-dashboard-body .dashboard-content .offcanvas :is(h2, h3, h4, h5, label) { color: var(--maple-fg) !important; }
body.maple-v3.houzez-dashboard-body .dashboard-content .dashboard-label.bg-info { color: #06333c !important; }
body.maple-v3.houzez-dashboard-body .stats-box .text-success { color: #137344 !important; }
body.maple-v3.houzez-dashboard-body .stats-box .text-danger { color: #a6283c !important; }
body.maple-v3.houzez-dashboard-body[data-theme="dark"] .stats-box .text-success { color: #76daa8 !important; }
body.maple-v3.houzez-dashboard-body[data-theme="dark"] .stats-box .text-danger { color: #ff8d9c !important; }
body.maple-v3.houzez-dashboard-body .dashboard-content label { color: var(--maple-fg) !important; }
body.maple-v3.houzez-dashboard-body .media-drag-drop { background: var(--maple-bg) !important; color: var(--maple-fg) !important; border-color: var(--maple-border) !important; }
body.maple-v3.houzez-dashboard-body .dashboard-content button[role="tab"] { background: var(--maple-card) !important; color: var(--maple-fg) !important; border-color: var(--maple-border) !important; }
body.maple-v3.houzez-dashboard-body .dashboard-content button[role="tab"].active { background: var(--maple-primary) !important; color: var(--maple-primary-ink) !important; border-color: var(--maple-primary) !important; }
body.maple-v3.houzez-dashboard-body .media-drag-drop :is(.upload-image-counter, .uploaded) { color: var(--maple-muted) !important; }
/* Dashboard tables must use the same palette as their surrounding panels. */
body.maple-v3.houzez-dashboard-body .dashboard-content .table {
  --bs-table-color: var(--maple-fg) !important;
  --bs-table-bg: var(--maple-card) !important;
  --bs-table-border-color: var(--maple-border) !important;
  --bs-table-striped-color: var(--maple-fg) !important;
  --bs-table-striped-bg: var(--maple-bg) !important;
  --bs-table-hover-color: var(--maple-fg) !important;
  --bs-table-hover-bg: var(--maple-bg) !important;
  --bs-table-active-color: var(--maple-fg) !important;
  --bs-table-active-bg: var(--maple-bg) !important;
}
body.maple-v3.houzez-dashboard-body .dashboard-content .table > :not(caption) > * > * {
  background-color: var(--bs-table-bg) !important;
  color: var(--maple-fg) !important;
  border-color: var(--maple-border) !important;
}
body.maple-v3.houzez-dashboard-body .dashboard-content .table thead th { --bs-table-bg: var(--maple-bg); }
body.maple-v3.houzez-dashboard-body .dashboard-label.bg-warning { color: #332600 !important; }
/* One rounded focus cue for typing fields; wrapped fields use their container. */
html body.maple-v3 :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]), textarea, select):focus,
html body.maple-v3 .bootstrap-select > .dropdown-toggle:focus {
  outline: none !important;
  outline-offset: 0 !important;
  border-color: var(--maple-primary) !important;
  border-radius: 10px;
  box-shadow: 0 0 0 2px rgba(92, 111, 178, .20) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--maple-primary) 20%, transparent) !important;
}
html body.maple-v3 :is(.maple-results-keyword, .maple-search-choice):focus-within {
  border-color: var(--maple-primary) !important;
  box-shadow: 0 0 0 2px rgba(92, 111, 178, .20) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--maple-primary) 20%, transparent) !important;
}
html body.maple-v3 .maple-results-keyword #aq-maple-results-keyword:focus,
html body.maple-v3 .aq-native-choice .bootstrap-select > :is(select, .dropdown-toggle):focus {
  outline: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
/* The member navigation prioritizes daily actions and keeps extra tools available. */
body.maple-v3 .aq-member-nav ul, body.maple-v3 .aq-member-logout ul { list-style: none; padding: 0; margin: 0; }
body.maple-v3 .aq-member-nav h5 { margin: 16px 20px 8px; color: var(--maple-muted); font-size: 12px; }
body.maple-v3 .aq-member-nav a, body.maple-v3 .aq-member-logout a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; }
body.maple-v3 .aq-member-advanced { margin: 8px 10px; border-top: 1px solid var(--maple-border); }
body.maple-v3 .aq-member-advanced > summary { cursor: pointer; padding: 12px 8px; color: var(--maple-muted); font-size: 13px; }
body.maple-v3 .aq-member-logout { border-top: 1px solid var(--maple-border); margin-top: 8px; }
/* Compact overview: actions and the three existing property totals. */
body.maple-v3 .aq-member-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
body.maple-v3 .aq-member-actions .btn { min-height: 44px; padding: 10px 20px; border-radius: 10px; }
body.maple-v3 .aq-member-stats-main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
body.maple-v3 :is(.aq-member-stats-main, .aq-member-stats-extra) > div { width: 100%; max-width: 100%; min-width: 0; padding: 0; }
body.maple-v3.aq-member-dashboard .stats-box { height: 100%; min-height: 140px; margin: 0; }
body.maple-v3.aq-member-dashboard .stats-box > span { display: none; }
body.maple-v3 .aq-member-stat-link { display: block; height: 100%; border-radius: 16px; color: inherit; text-decoration: none; }
body.maple-v3 .aq-member-stat-link .stats-box { transition: border-color .15s ease; }
body.maple-v3 .aq-member-stat-link:hover .stats-box,
body.maple-v3 .aq-member-stat-link:focus-visible .stats-box { border-color: var(--maple-primary); }
body.maple-v3 .aq-member-stat-link:focus-visible { outline: 2px solid var(--maple-primary); outline-offset: 3px; }
body.maple-v3 .aq-member-stats-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* Profile contains four primary fields; optional fields stay in their original form. */
body.maple-v3.aq-member-profile .dashboard-content > .container { width: 100%; max-width: 100%; }
body.maple-v3 .aq-account-view-bar { display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: 0 12px 20px; padding: 4px; border: 1px solid var(--maple-border); border-radius: 12px; background: var(--maple-card); scroll-margin-top: 100px; }
body.maple-v3 .aq-account-view-bar button { min-height: 44px; padding: 8px 18px; border: 0; border-radius: 8px; background: transparent; color: var(--maple-muted); font: 600 14px Cairo, Tahoma, sans-serif; }
body.maple-v3 .aq-account-view-bar button[aria-pressed="true"] { background: var(--maple-primary); color: var(--maple-primary-ink); }
body.maple-v3 :is(.aq-profile-primary, .aq-profile-settings, .aq-profile-extra-field)[hidden] { display: none !important; }
body.maple-v3 .aq-profile-primary .aq-profile-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; margin: 0; align-items: start; }
body.maple-v3 :is(.aq-profile-photo, .aq-profile-form-column) { width: 100%; max-width: 100%; min-width: 0; padding: 0; }
body.maple-v3 .aq-profile-photo .block-wrap { min-height: 0; padding: 16px !important; }
body.maple-v3 .aq-profile-photo .profile-card { display: flex; flex-direction: column; gap: 12px; padding: 0; border: 0; background: transparent; box-shadow: none; }
body.maple-v3 .aq-profile-photo .profile-img { margin: 0 !important; }
body.maple-v3 .aq-profile-photo .profile-img img { width: 80px; height: 80px; max-width: 80px; border-radius: 50%; object-fit: cover; }
body.maple-v3 .aq-profile-photo .profile-info > :not(.profile-name) { display: none; }
body.maple-v3 .aq-profile-photo .profile-name { margin: 0 !important; padding: 0 !important; border: 0 !important; }
body.maple-v3 .aq-profile-photo .profile-name h4 { font-size: 15px; overflow-wrap: anywhere; }
body.maple-v3 .aq-profile-photo .profile-name p { display: none; }
body.maple-v3 .aq-profile-photo .profile-name .btn { min-height: 44px; padding: 8px; font-size: 12px; margin-top: 8px !important; }
body.maple-v3 .aq-profile-basic-field { order: 0; }
body.maple-v3 .aq-profile-extra-toggle-wrap { order: 1; }
body.maple-v3 .aq-profile-extra-field { order: 2; }
body.maple-v3 .aq-profile-extra-toggle { margin: 4px 0 12px; padding: 8px 0; min-height: 44px; border: 0; background: transparent; color: var(--maple-muted); font: 500 13px Cairo, Tahoma, sans-serif; text-decoration: underline; text-underline-offset: 4px; }
body.maple-v3 .aq-profile-settings { width: 100%; max-width: 100%; padding: 0 12px; box-sizing: border-box; }
body.maple-v3 .aq-member-setting { margin: 0 0 12px; border: 1px solid var(--maple-border); border-radius: 12px; background: var(--maple-card); overflow: hidden; }
body.maple-v3 .aq-member-setting > summary { cursor: pointer; padding: 16px; min-height: 52px; color: var(--maple-fg); font-weight: 600; }
body.maple-v3 .aq-member-setting[open] > summary { border-bottom: 1px solid var(--maple-border); }
body.maple-v3 .aq-member-setting > :not(summary) { margin: 0 !important; padding: 16px !important; box-sizing: border-box; }
body.maple-v3 .aq-profile-settings .account-panel.wrap { width: 100%; max-width: 100%; margin: 0 !important; border: 0; box-shadow: none; }
body.maple-v3 .aq-profile-settings .aq-wa-reminders { border: 0; border-radius: 0; }
body.maple-v3 .aq-profile-settings .palette-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.maple-v3 .aq-profile-public-link { display: inline-flex; }
@media (max-width: 767px) {
  body.maple-v3 .aq-member-stats-main { grid-template-columns: 1fr; gap: 10px; }
  body.maple-v3.aq-member-dashboard .stats-box { min-height: 110px; }
  body.maple-v3 .aq-member-actions { display: grid; grid-template-columns: 1fr 1fr; }
  body.maple-v3 .aq-member-actions > :first-child { grid-column: 1 / -1; }
  body.maple-v3 .aq-profile-primary .aq-profile-row { grid-template-columns: 1fr; gap: 12px; }
  body.maple-v3 .aq-profile-photo .profile-card { flex-direction: row; align-items: center; gap: 16px; }
  body.maple-v3 .aq-profile-photo .profile-info { flex: 1; min-width: 0; }
  body.maple-v3 .aq-account-view-bar { margin-inline: 12px; }
  body.maple-v3 .aq-account-view-bar button { padding-inline: 14px; }
  body.maple-v3 .aq-profile-settings .palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (forced-colors: active) {
  html body.maple-v3 :is(input, textarea, select):focus,
  html body.maple-v3 :is(.maple-results-keyword, .maple-search-choice):focus-within { outline: 2px solid Highlight !important; outline-offset: 2px !important; box-shadow: none !important; }
  html body.maple-v3 .maple-results-keyword input:focus,
  html body.maple-v3 .aq-native-choice .bootstrap-select > :is(select, .dropdown-toggle):focus { outline: none !important; box-shadow: none !important; }
}

body.maple-v3.aq-member-profile .aq-member-nav a[aria-current="false"] {
  color: var(--maple-fg) !important;
  background: transparent !important;
}
