/* Final dark-mode fixes layer (loaded last for cache-safe overrides) */

/* ========================================
   NOTIFICATIONS - Dark Mode (Facebook-style)
   ======================================== */
body.dark-mode .profile-dropdown-menu,
body.dark-mode .notifications-dropdown,
body.dark-mode .notifications-block-wrap {
  background: #242526 !important;
  border-color: #3a3b3c !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-header,
body.dark-mode .notifications-block-wrap .dropdown-header,
body.dark-mode .rv-notif-header {
  background: #242526 !important;
  border-color: #3a3b3c !important;
}

body.dark-mode .rv-notif-header h6 {
  color: #e4e6eb !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-item,
body.dark-mode .notifications-dropdown .dropdown-item,
body.dark-mode .notifications-block-wrap .dropdown-item {
  color: #e4e6eb !important;
  opacity: 1 !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-item i,
body.dark-mode .notifications-dropdown .dropdown-item i,
body.dark-mode .notifications-block-wrap .dropdown-item i {
  color: #b0b3b8 !important;
}

body.dark-mode .rv-notif-toggle {
  background: #3a3b3c !important;
  color: #e4e6eb !important;
}

body.dark-mode .rv-notif-toggle:hover,
body.dark-mode .rv-notif-toggle:focus {
  background: #4e4f50 !important;
  color: #ffffff !important;
}

body.dark-mode .rv-notif-toggle i {
  color: #e4e6eb !important;
}

body.dark-mode .rv-notif-badge {
  border-color: #18191a !important;
  background: linear-gradient(135deg, #E07A5F 0%, #f39150 100%) !important;
}

body.dark-mode .rv-notif-action-link {
  color: #E07A5F !important;
}

body.dark-mode .rv-notif-action-link:hover {
  background: #3a3b3c !important;
  color: #f39150 !important;
}

body.dark-mode .rv-notif-filters {
  background: #242526 !important;
  border-color: #3a3b3c !important;
}

body.dark-mode .rv-notif-filter {
  background: #3a3b3c !important;
  border: none !important;
  color: #b0b3b8 !important;
}

body.dark-mode .rv-notif-filter:hover {
  background: #4e4f50 !important;
  color: #e4e6eb !important;
}

body.dark-mode .rv-notif-filter-active {
  background: linear-gradient(135deg, #E07A5F 0%, #f39150 100%) !important;
  color: #ffffff !important;
}

body.dark-mode .rv-notif-filter-active:hover {
  background: linear-gradient(135deg, #f39150 0%, #E07A5F 100%) !important;
}

body.dark-mode .notifications-list {
  background: #18191a !important;
  scrollbar-color: #3a3b3c transparent !important;
}

body.dark-mode .rv-notif-group-title {
  background: #18191a !important;
  color: #b0b3b8 !important;
}

body.dark-mode .rv-notif-item {
  background: #242526 !important;
  color: #e4e6eb !important;
}

body.dark-mode .rv-notif-item:hover {
  background: #3a3b3c !important;
}

body.dark-mode .rv-notif-item-unread {
  background: linear-gradient(90deg, rgba(224, 122, 95, 0.15) 0%, rgba(243, 145, 80, 0.15) 100%) !important;
  border-left-color: #E07A5F !important;
}

body.dark-mode .rv-notif-item-unread:hover {
  background: linear-gradient(90deg, rgba(224, 122, 95, 0.22) 0%, rgba(243, 145, 80, 0.22) 100%) !important;
}

body.dark-mode .rv-notif-item-unread .rv-notif-content .small {
  color: #e4e6eb !important;
}

body.dark-mode .rv-notif-content .small {
  color: #b0b3b8 !important;
}

body.dark-mode .rv-notif-time {
  color: #8a8d91 !important;
}

body.dark-mode .rv-notif-empty {
  background: #18191a !important;
}

body.dark-mode .rv-notif-empty i {
  color: #3a3b3c !important;
}

body.dark-mode .rv-notif-empty small {
  color: #8a8d91 !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-item:hover,
body.dark-mode .notifications-dropdown .dropdown-item:hover,
body.dark-mode .notifications-block-wrap .dropdown-item:hover {
  background: #3a3b3c !important;
  color: #ffffff !important;
}

body.dark-mode .profile-dropdown-menu .fw-semibold,
body.dark-mode .profile-dropdown-menu small,
body.dark-mode .notifications-dropdown small {
  color: #b0b3b8 !important;
}

body.dark-mode .rv-home-navbar {
  --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body.dark-mode .rv-home-navbar .navbar-toggler {
  border-color: #4a597e !important;
}

/* Topbar mobile burger icon visibility in dark mode */
body.dark-mode .topbar-mobile-menu .btn,
body.dark-mode .topbar-mobile-menu .btn-link,
body.dark-mode .topbar-mobile-menu .bi-list {
  color: #f4f7ff !important;
}

body.dark-mode .topbar-mobile-menu .btn:hover,
body.dark-mode .topbar-mobile-menu .btn:focus {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Auth topbar icons (burger + bell) override Bootstrap `.text-dark` in dark mode */
body.dark-mode header.topbar .btn-link.text-dark,
body.dark-mode header.topbar .btn-link.text-dark i,
body.dark-mode header.topbar .topbar-mobile-menu .btn-link,
body.dark-mode header.topbar .topbar-mobile-menu .btn-link i,
body.dark-mode header.topbar .top-actions .btn-link,
body.dark-mode header.topbar .top-actions .btn-link i {
  color: #f4f7ff !important;
  opacity: 1 !important;
}

/* Extra specificity for icon glyphs (burger + bell) across breakpoints */
html body.dark-mode header.topbar .topbar-mobile-menu .btn i.bi,
html body.dark-mode header.topbar .topbar-mobile-menu .bi-list,
html body.dark-mode header.topbar .top-actions .btn i.bi,
html body.dark-mode header.topbar .top-actions .bi-bell,
html body.dark-mode header.topbar .top-actions .rv-notif-toggle i.bi {
  color: #f8fbff !important;
  opacity: 1 !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
}

html body.dark-mode header.topbar .topbar-mobile-menu .btn-link,
html body.dark-mode header.topbar .top-actions .btn-link {
  border-radius: 10px !important;
}

body.dark-mode header.topbar .btn-link.text-dark:hover,
body.dark-mode header.topbar .btn-link.text-dark:focus,
body.dark-mode header.topbar .topbar-mobile-menu .btn-link:hover,
body.dark-mode header.topbar .topbar-mobile-menu .btn-link:focus,
body.dark-mode header.topbar .top-actions .btn-link:hover,
body.dark-mode header.topbar .top-actions .btn-link:focus {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Global dark-mode contrast for primary action buttons */
body.dark-mode .btn-accent,
body.dark-mode .btn-custom {
  background: #f2cc8f !important;
  border-color: #f2cc8f !important;
  color: #101728 !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

body.dark-mode .btn-accent:hover,
body.dark-mode .btn-accent:focus,
body.dark-mode .btn-custom:hover,
body.dark-mode .btn-custom:focus {
  background: #f39150 !important;
  border-color: #f39150 !important;
  color: #ffffff !important;
}

body.dark-mode .btn-accent:disabled,
body.dark-mode .btn-custom:disabled,
body.dark-mode .btn-accent.disabled,
body.dark-mode .btn-custom.disabled {
  background: #6f7f9f !important;
  border-color: #6f7f9f !important;
  color: #e7edff !important;
  opacity: 0.9 !important;
}

/* Dark mode: outline buttons use light brand tone */
body.dark-mode .btn-custom-outline,
body.dark-mode .btn-outline-brand,
body.dark-mode .btn-outline-primary {
  color: #f2cc8f !important;
  border-color: #f2cc8f !important;
  background: transparent !important;
}

body.dark-mode .btn-custom-outline:hover,
body.dark-mode .btn-custom-outline:focus,
body.dark-mode .btn-outline-brand:hover,
body.dark-mode .btn-outline-brand:focus,
body.dark-mode .btn-outline-primary:hover,
body.dark-mode .btn-outline-primary:focus {
  color: #101728 !important;
  background: #f2cc8f !important;
  border-color: #f2cc8f !important;
}

/* High-specificity modal fixes for ids defined in styles.css */
body.dark-mode #settingsModal .modal-content,
body.dark-mode #emotionModal .modal-content,
body.dark-mode #quickNoteModal .modal-content,
body.dark-mode #financeModal .modal-content,
body.dark-mode #notesModal .modal-content,
body.dark-mode #photoModal .modal-content,
body.dark-mode #videoModal .modal-content,
body.dark-mode #quickLinkModal .modal-content,
body.dark-mode #photoPickerModal .modal-content,
body.dark-mode #eventModal .modal-content,
body.dark-mode #membershipModal .modal-content,
body.dark-mode #lightboxModal .modal-content {
  background: #101728 !important;
  border-color: #2a3248 !important;
  color: #f5f7ff !important;
}

body.dark-mode .rv-cal-toolbar,
body.dark-mode .rv-quick-add,
body.dark-mode .rv-cal-drawer,
body.dark-mode .rv-mobile-agenda {
  background: #101728 !important;
  border-color: #2a3248 !important;
}

body.dark-mode .rv-cal-drawer-head,
body.dark-mode .rv-cal-drawer-foot,
body.dark-mode .rv-mobile-agenda-head {
  background: #151f36 !important;
  border-color: #2a3248 !important;
}

body.dark-mode .rv-mobile-agenda-item,
body.dark-mode .rv-mobile-agenda-empty {
  border-color: #2a3248 !important;
}

body.dark-mode .rv-cal-title,
body.dark-mode .rv-mobile-agenda-main strong,
body.dark-mode .rv-mobile-agenda-main small,
body.dark-mode .rv-mobile-agenda-time {
  color: #d7dff7 !important;
}

body.dark-mode #calendar .fc .rv-day-selected {
  outline-color: #f39150 !important;
}

/* Calendar React (safe CSS-only dark alignment) */
body.dark-mode #calendar-react .calendar-day {
  background: #151f36 !important;
  border-color: #2a3a5f !important;
  color: #e7edff !important;
}

body.dark-mode #calendar-react .calendar-day.empty {
  background: #111a2e !important;
  opacity: 0.55 !important;
}

body.dark-mode #calendar-react .calendar-day .fw-bold {
  color: #f5f7ff !important;
}

body.dark-mode #calendar-react .calendar-day.today:not(.selected) {
  background: rgba(224, 122, 95, 0.14) !important;
  border-color: #e07a5f !important;
}

body.dark-mode #calendar-react .calendar-day.selected {
  background: rgba(242, 204, 143, 0.18) !important;
  border-color: #f2cc8f !important;
}

body.dark-mode #calendar-react .calendar-shell .text-muted,
body.dark-mode #calendar-react .calendar-shell small,
body.dark-mode #calendar-react .calendar-shell p {
  color: #c5cfea !important;
}

body.dark-mode #calendar-react .calendar-shell .card-title span,
body.dark-mode #calendar-react .calendar-shell h6,
body.dark-mode #calendar-react .calendar-shell summary {
  color: #f0f5ff !important;
}

body.dark-mode .app-footer {
  background: #0f1627 !important;
  border-top-color: #2a3248 !important;
}

body.dark-mode .app-footer .app-footer-links a,
body.dark-mode .app-footer .app-footer-copy {
  color: #b8c3e3 !important;
}

body.dark-mode #settingsModal .modal-header,
body.dark-mode #settingsModal .modal-footer,
body.dark-mode #emotionModal .modal-header,
body.dark-mode #emotionModal .modal-footer,
body.dark-mode #quickNoteModal .modal-header,
body.dark-mode #quickNoteModal .modal-footer,
body.dark-mode #financeModal .modal-header,
body.dark-mode #financeModal .modal-footer,
body.dark-mode #notesModal .modal-header,
body.dark-mode #notesModal .modal-footer,
body.dark-mode #photoModal .modal-header,
body.dark-mode #photoModal .modal-footer,
body.dark-mode #videoModal .modal-header,
body.dark-mode #videoModal .modal-footer,
body.dark-mode #quickLinkModal .modal-header,
body.dark-mode #quickLinkModal .modal-footer,
body.dark-mode #photoPickerModal .modal-header,
body.dark-mode #photoPickerModal .modal-footer,
body.dark-mode #eventModal .modal-header,
body.dark-mode #eventModal .modal-footer,
body.dark-mode #membershipModal .modal-header,
body.dark-mode #membershipModal .modal-footer {
  background: #151f36 !important;
  border-color: #2a3248 !important;
}

body.dark-mode #settingsModal .modal-body,
body.dark-mode #emotionModal .modal-body,
body.dark-mode #quickNoteModal .modal-body,
body.dark-mode #financeModal .modal-body,
body.dark-mode #notesModal .modal-body,
body.dark-mode #photoModal .modal-body,
body.dark-mode #videoModal .modal-body,
body.dark-mode #quickLinkModal .modal-body,
body.dark-mode #photoPickerModal .modal-body,
body.dark-mode #eventModal .modal-body,
body.dark-mode #membershipModal .modal-body {
  background: #101728 !important;
  color: #f5f7ff !important;
}

body.dark-mode #settingsModal .form-label,
body.dark-mode #settingsModal .form-check-label,
body.dark-mode #settingsModal .tab-pane p,
body.dark-mode #settingsModal .tab-pane strong,
body.dark-mode #quickNoteModal .form-label,
body.dark-mode #quickNoteModal .form-text {
  color: #d7dff7 !important;
}

body.dark-mode #settingsModal .settings-tabs {
  background: #151f36 !important;
  border-color: #2a3248 !important;
}

/* Bootstrap button variants: enforce readable contrast in dark mode globally */
body.dark-mode .btn-primary,
body.dark-mode .btn.btn-primary {
  background: #f39150 !important;
  border-color: #f39150 !important;
  color: #101728 !important;
}

body.dark-mode .btn-primary:hover,
body.dark-mode .btn-primary:focus,
body.dark-mode .btn.btn-primary:hover,
body.dark-mode .btn.btn-primary:focus {
  background: #f2cc8f !important;
  border-color: #f2cc8f !important;
  color: #101728 !important;
}

body.dark-mode .btn-secondary,
body.dark-mode .btn.btn-secondary {
  background: #4b648b !important;
  border-color: #4b648b !important;
  color: #f5f7ff !important;
}

body.dark-mode .btn-secondary:hover,
body.dark-mode .btn-secondary:focus,
body.dark-mode .btn.btn-secondary:hover,
body.dark-mode .btn.btn-secondary:focus {
  background: #5f7aa6 !important;
  border-color: #5f7aa6 !important;
  color: #ffffff !important;
}

body.dark-mode .btn-outline-secondary {
  color: #cdd9f7 !important;
  border-color: #5f7aa6 !important;
  background: transparent !important;
}

body.dark-mode .btn-outline-secondary:hover,
body.dark-mode .btn-outline-secondary:focus {
  color: #101728 !important;
  background: #cdd9f7 !important;
  border-color: #cdd9f7 !important;
}

body.dark-mode .btn:disabled,
body.dark-mode .btn.disabled {
  background: #3e4f70 !important;
  border-color: #3e4f70 !important;
  color: #c7d3ef !important;
  opacity: 1 !important;
}

body.dark-mode #settingsModal .settings-tabs .nav-link {
  color: #9fa7c7 !important;
}

body.dark-mode #settingsModal .settings-tabs .nav-link.active {
  color: #ffffff !important;
  background: #2a3f67 !important;
  border-color: #3e5889 !important;
}

/* Landing page final fixes */
body.dark-mode .welcome-area .header-text h1,
body.dark-mode .welcome-area .header-text p,
body.dark-mode .welcome-area .header-text .small,
body.dark-mode .welcome-area .header-text .small a {
  color: #f5f7ff !important;
}

body.dark-mode #features .mh-card,
body.dark-mode #membership-highlights .mh-card,
body.dark-mode #testimonials .mh-card,
body.dark-mode #memory .mh-card,
body.dark-mode #glance .glance-card,
body.dark-mode .duo-card,
body.dark-mode .memory-card {
  background: #101728 !important;
  border: 1px solid #2a3248 !important;
}

body.dark-mode #features .mh-title,
body.dark-mode #membership-highlights .mh-title,
body.dark-mode #testimonials h2,
body.dark-mode #memory h5,
body.dark-mode #features .mh-text,
body.dark-mode #membership-highlights .mh-text,
body.dark-mode #testimonials p,
body.dark-mode #memory p,
body.dark-mode #glance h2,
body.dark-mode #glance h5,
body.dark-mode #glance p,
body.dark-mode .duo-body h3,
body.dark-mode .duo-body p,
body.dark-mode #features .section-heading span,
body.dark-mode #membership-highlights .text-muted,
body.dark-mode #testimonials .text-muted {
  color: #d7dff7 !important;
}

body.dark-mode #features,
body.dark-mode #membership-highlights,
body.dark-mode #testimonials,
body.dark-mode #memory,
body.dark-mode #glance,
body.dark-mode #memories-emotions,
body.dark-mode #shared-journal,
body.dark-mode #shared-links,
body.dark-mode #journey-companion {
  background: #0f1627 !important;
}

body.dark-mode .rv-footer .container {
  background: rgba(16, 23, 40, 0.88) !important;
  border: 1px solid #2a3248 !important;
}
