/* BlueSky Custom Styles */

/* Base styles */
:root {
  --primary-color: #1185fe;
  --primary-light: rgba(17, 133, 254, 0.1);
  --primary-hover: #0d6ecd;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --background-light: #f9fafb;
  --border-color: #e5e7eb;
  --accent-color: #CF562F;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Grid Backgrounds */
.dark-grid-background {
  background-image: 
      linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}

.light-grid-background {
  background-image: 
      linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}

.bent-grid-background {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: linear-gradient(rgba(17, 133, 254, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(17, 133, 254, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    transform-origin: center center;
    transform: rotate(55deg);
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Container for glow effects and animations */
.blob-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  transition: all 3s ease;
}

.blob-1 {
  width: 600px;
  height: 600px;
  top: -300px;
  right: -100px;
  background: linear-gradient(45deg, rgba(17, 133, 254, 0.1), rgba(17, 133, 254, 0.2));
  animation: float 15s ease-in-out infinite alternate;
}

.blob-2 {
  width: 500px;
  height: 500px;
  bottom: -200px;
  left: -150px;
  background: linear-gradient(45deg, rgba(17, 133, 254, 0.1), rgba(17, 133, 254, 0.15));
  animation: float 18s ease-in-out infinite alternate-reverse;
}

/* Animations */
@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(50px, 50px) rotate(10deg);
  }
  100% {
    transform: translate(10px, 30px) rotate(-10deg);
  }
}

@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes pulse-slow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(50, 50);
    opacity: 0;
  }
}

/* Custom Form Styling */
.form-input {
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(17, 133, 254, 0.2);
}

.form-input.error {
  border-color: #f56565;
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.2);
}

/* Auth form error styles */
input.error,
textarea.error,
select.error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}

input.error:focus,
textarea.error:focus,
select.error:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
  background-color: #ffffff !important;
}

.error-message {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #ef4444;
  line-height: 1.25rem;
}

/* Button Animation */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.btn-primary:hover::after {
  animation: ripple 1s ease-out;
}

/* Header specific styles */
#main-header {
  transition: all 0.3s ease;
}

#main-header .container {
  transition: all 0.3s ease;
}

/* Mega menu animations */
.group:hover .group-hover\:visible {
  transition-delay: 150ms;
}

/* Mobile Menu Animations */
#mobile-menu {
  transform-origin: left;
  transform: translateX(-100%);
  transition: transform 0.25s ease-in-out;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  will-change: transform;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  border-right: 1px solid rgba(229, 231, 235, 0.75);
}

/* Mobile menu panel specific positioning */
#mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  width: 320px;
  background-color: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border-left: 1px solid #e5e7eb;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

#mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  backdrop-filter: blur(4px);
  display: none;
}

/* Mobile menu open state */
body.mobile-menu-open {
  /* Let the menu handle its own scroll prevention */
}

#mobile-menu.visible {
  transform: translateX(0);
}

/* New mobile menu styles for the updated structure */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999 !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  display: block;
}

.mobile-menu.hidden {
  opacity: 0;
  visibility: hidden;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100%;
  background: white !important;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  overflow: hidden;
  border-radius: 16px 0 0 16px;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
  z-index: 10000 !important;
}

.mobile-menu.active .mobile-menu-content {
  transform: translateX(0);
}

/* Custom scrollbar for mobile menu */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

#mobile-menu-backdrop {
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  will-change: opacity;
  backdrop-filter: blur(1px);
  background-color: rgba(0, 0, 0, 0.4);
}

#mobile-menu-backdrop.visible {
  opacity: 1;
}

/* Mobile submenu styles */
.mobile-submenu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}

.mobile-submenu:not(.hidden) {
  opacity: 1;
}

/* Rotate arrow animation */
.rotate-180 {
  transform: rotate(180deg);
}

/* Nav menu icons in mobile */
#mobile-menu nav a svg, 
#mobile-menu nav button svg {
  min-width: 20px;
}

/* Sidebar-like hover effects */
#mobile-menu nav a:hover, 
#mobile-menu nav button:hover {
  background-color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Scrollbar styles - only targeted classes */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

/* Thin scrollbar for specific elements */
.thin-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.thin-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.thin-scrollbar::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 2px;
}

.thin-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Utility Classes */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(to right, var(--primary-color), #38bdf8);
}

.shadow-blue {
  box-shadow: 0 4px 14px 0 rgba(17, 133, 254, 0.2);
}

/* Animation utilities */
.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

.animate-pulse-slow {
  animation: pulse-slow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Background blob positioning */
.bg-blob-1 {
  top: -160px;
  left: -160px;
}

.bg-blob-2 {
  top: -160px;
  right: -160px;
}

.bg-blob-3 {
  bottom: -160px;
  left: -160px;
}

.bg-blob-4 {
  bottom: 80px;
  right: 80px;
}

/* Flash message handling */
.flash-message {
  transition: opacity 0.5s;
  display: block;
  opacity: 1;
}

/* Auth Form Containers */
.auth-container {
  max-width: 28rem;
  width: 100%;
}

.auth-form {
  padding: 2rem;
  border-radius: 0.5rem;
  background-color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  .blob-1, .blob-2 {
    opacity: 0.3;
  }
  
  #main-header {
    position: sticky;
    top: 0;
    z-index: 50;
  }
  
  .dark-grid-background, .light-grid-background {
    background-size: 25px 25px;
  }
  
  /* Ensure mobile menu is properly positioned on all mobile devices */
  #mobile-menu-panel {
    height: 100vh;
    height: 100dvh; /* Use dynamic viewport height for better mobile support */
  }
  
  #mobile-menu-overlay {
    height: 100vh;
    height: 100dvh;
  }
}

/* Hide mobile menu on larger screens (lg: 1024px when sidebar is visible) */
@media (min-width: 1024px) {
  #mobile-menu-panel {
    display: none !important;
  }

  #mobile-menu-overlay {
    display: none !important;
  }
}

/* === Dashboard Menu Styles === */

.dashboard-menu-item {
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 0.375rem;
  overflow: hidden;
}

.dashboard-menu-item:hover span {
  color: #1185fe !important;
}

.dashboard-menu-item:active {
  transform: translateX(1px);
  transition-duration: 0.1s;
}

/* Simplified collapsible menu transitions */
.dashboard-submenu {
  transition: all 0.2s ease;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
}

.dashboard-submenu.expanded {
  max-height: 350px;
  opacity: 1;
}


/* Arrow rotation animation for dashboard submenus */
.dashboard-menu-arrow {
  transition: transform 0.2s ease;
  transform: rotate(180deg); /* Default: point down when closed */
}

.dashboard-menu-arrow.rotated {
  transform: rotate(0deg); /* When open: point up */
}

/* Icon animations */
.dashboard-icon {
  transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.dashboard-menu-item:hover .dashboard-icon {
  transform: scale(1.1);
  color: #1185fe;
}

/* Smooth scrolling for sidebar */
.dashboard-sidebar-scroll {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 133, 254, 0.2) transparent;
}

.dashboard-sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}

.dashboard-sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(17, 133, 254, 0.3);
  border-radius: 2px;
}

.dashboard-sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(17, 133, 254, 0.5);
} 

/* === Auth Page Styles === */

/* Ensure body doesn't overflow horizontally on auth pages */
/* Note: The global body style already has overflow-x: hidden; this might be redundant */
/* .body { 
    overflow-x: hidden; 
} */

/* === Register Page Password Dialog === */
.password-dialog {
    position: fixed;
    right: -320px; /* Start off-screen */
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
    border: 1px solid #e5e7eb; /* neutral-200 */
}
.password-dialog.show {
    right: 20px; /* Slide in */
    opacity: 1;
    visibility: visible;
}
.password-dialog ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem; /* text-sm */
}
.password-dialog li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #6b7280; /* neutral-500 */
    transition: color 0.3s ease;
}
.password-dialog li.valid {
    color: #16a34a; /* green-600 */
}
.password-dialog svg {
    width: 1rem; /* h-4 */
    height: 1rem; /* w-4 */
    margin-right: 8px;
    flex-shrink: 0;
}
.password-strength-bar {
    height: 4px;
    background-color: #e5e7eb; /* neutral-200 */
    border-radius: 2px;
    overflow: hidden;
    margin-top: 12px;
}
.password-strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

/* Responsive adjustments for password dialog */
@media (max-width: 768px) {
    .password-dialog {
        position: fixed;
        right: 16px;
        left: 16px;
        top: auto;
        bottom: 16px;
        transform: translateY(100%); /* Start below screen */
        width: auto;
        max-width: calc(100% - 32px);
    }
    .password-dialog.show {
        transform: translateY(0); /* Slide up */
    }
}

/* === 2FA Page OTP Input === */
.otp-input {
    width: 3rem; /* w-12 */
    height: 3.5rem; /* h-14 */
    text-align: center;
    font-size: 1.125rem; /* text-lg */
    border-radius: 0.5rem; /* rounded-lg */
    border: 1px solid #e5e7eb; /* border-neutral-200 */
    background-color: #f9fafb; /* bg-neutral-50 */
    transition: all 0.2s ease-in-out;
    caret-color: #CF562F; /* accent-color */
}
.otp-input:focus {
    outline: none;
    border-color: #CF562F; /* focus:border-accent-color */
    box-shadow: 0 0 0 2px rgba(207, 86, 47, 0.2); /* focus:ring-2 focus:ring-accent-color/20 */
    background-color: white;
}

/* Sort button: white text when active and bg-[#CF562F]/90 is applied */
.sort-button.active.bg-\[\#CF562F\]\/90, .upvote-drawer-button.bg-\[\#CF562F\]\/90 {
  color: #fff !important;
}

/* === Country Dropdown Component Styles === */
/* Shared between dashboard and admin templates */

/* Country dropdown container */
.country-dropdown-container {
    position: relative;
    z-index: 10;
    isolation: isolate;
}

/* Dropdown positioning and styling - SIMPLIFIED */
.country-dropdown {
    position: fixed !important;
    z-index: 999999 !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.375rem !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    min-width: 200px !important;
    max-width: 400px !important;
}

/* Dropdown visibility */
.country-dropdown.hidden {
    display: none !important;
}

.country-dropdown.show {
    display: block !important;
}

/* Dropdown items */
.country-dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.country-dropdown-item:last-child {
    border-bottom: none;
}

/* Dashboard theme (blue) */
.country-dropdown-dashboard .country-dropdown-item:hover {
    background-color: rgba(17, 133, 254, 0.1);
    color: #1185fe;
}

/* Admin theme (red) */
.country-dropdown-admin .country-dropdown-item:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* No results state */
.country-dropdown-no-results {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    font-style: italic;
}

/* Search input styling and EXTREME autofill prevention */
.country-search-input {
    autocomplete: new-password !important;
    -webkit-autocomplete: off !important;
    -moz-autocomplete: off !important;
    autocapitalize: off !important;
    spellcheck: false !important;
}

.country-search-input:focus + .country-dropdown {
    display: block;
}

/* Disable ALL autofill styling */
.country-search-input:-webkit-autofill,
.country-search-input:-webkit-autofill:hover,
.country-search-input:-webkit-autofill:focus,
.country-search-input:-webkit-autofill:active,
.country-search-input:-moz-autofill,
.country-search-input:-moz-autofill:hover,
.country-search-input:-moz-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
    -moz-box-shadow: 0 0 0 1000px white inset !important;
    box-shadow: 0 0 0 1000px white inset !important;
    -webkit-text-fill-color: #374151 !important;
    -moz-text-fill-color: #374151 !important;
    text-fill-color: #374151 !important;
    background-color: transparent !important;
    background-image: none !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    transition: background-color 99999s ease-in-out 0s, background-image 99999s ease-in-out 0s !important;
}

/* Simple scrollbar styling */
.country-dropdown::-webkit-scrollbar {
    width: 6px;
}

.country-dropdown::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.country-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.country-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .country-dropdown {
        font-size: 0.875rem;
        max-height: 12rem;
    }
    
    .country-dropdown-item {
        padding: 0.625rem 0.875rem;
    }
}

/* Nuclear autofill prevention */
input[name*="country-search"] {
    background-color: transparent !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    background-image: none !important;
    background-attachment: scroll !important;
    background-repeat: no-repeat !important;
    background-position: 0% 0% !important;
    background-size: auto auto !important;
    background-origin: padding-box !important;
}

/* Ultra aggressive autofill prevention */
.country-search-input {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-user-modify: read-write-plaintext-only !important;
    font-family: inherit !important;
}

.country-search-input::-webkit-credentials-auto-fill-button,
.country-search-input::-webkit-strong-password-auto-fill-button,
.country-search-input::-webkit-contacts-auto-fill-button {
    visibility: hidden !important;
    position: absolute !important;
    right: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
}

/* Prevent autofill dropdown */
.country-search-input::-webkit-list-button {
    display: none !important;
}

.country-search-input::-webkit-calendar-picker-indicator {
    display: none !important;
}

/* Hide all browser suggestion UI */
.country-search-input::-webkit-textfield-decoration-container {
    visibility: hidden !important;
    position: absolute !important;
    right: -9999px !important;
}

/* Enhanced Modal and Focus Management Styles */
/* ========================================== */

/* Modal backdrop blur and dimming */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Modal content focus trap */
.modal-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0);
}

/* Footer blur when modal is active */
.modal-open footer {
    filter: blur(2px);
    pointer-events: none;
}

/* Enhanced shake animation for modals */
@keyframes modalShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.shake {
    animation: modalShake 0.5s ease-in-out;
}

/* Modal dialog improvements */
dialog.modal {
    padding: 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    backdrop: rgba(0, 0, 0, 0.6);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

dialog.modal::backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

dialog.modal[open]::backdrop {
    opacity: 1;
}

/* Smooth modal opening animation */
dialog.modal {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

dialog.modal[open] {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Smooth scrollbar for modal form content */
.modal-form-scroll {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.modal-form-scroll::-webkit-scrollbar {
    width: 4px;
}
.modal-form-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}
.modal-form-scroll::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Enhanced delete account modal styling */
#delete-account-modal .modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    z-index: 10000;
}

/* Google account disconnect modal improvements */
.disconnect-modal {
    backdrop-filter: blur(12px);
}

.disconnect-modal .modal-panel {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus management for modal dialogs */
.modal-dialog {
    outline: none;
}

.modal-dialog:focus-visible {
    outline: 2px solid #1185fe;
    outline-offset: 4px;
}

/* Improved button focus states within modals */
.modal-content button:focus-visible {
    outline: 2px solid #1185fe;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(17, 133, 254, 0.1);
}

/* Fix for Chrome deprecation warning: overflow: visible on SVG elements */
svg {
    overflow: hidden !important;
}

/* Specific fix for expense ratio calculator SVG elements */
#expense-ratio-decrease svg,
#expense-ratio-increase svg,
button svg {
    overflow: hidden !important;
}

/* Fix for canvas elements causing overflow: visible deprecation warning */
canvas {
    overflow: hidden !important;
}

/* Specific fix for expense chart canvas */
#expense-chart {
    overflow: hidden !important;
}

/* Override any TailwindCSS overflow-visible classes */
.overflow-visible {
    overflow: hidden !important;
}

/* Comprehensive fix for all visual elements that could trigger the deprecation warning */
img, video, canvas, svg, 
#expense-ratio-display,
[id*="expense-ratio"] * {
    overflow: hidden !important;
}

/* Footer positioning fixes */
footer {
    position: relative;
    z-index: 1;
    transition: filter 0.3s ease-in-out;
}

/* Mobile modal improvements */
@media (max-width: 768px) {
    dialog.modal {
        width: 95vw;
        max-width: 95vw;
        margin: auto;
    }
    
    .modal-backdrop {
        backdrop-filter: blur(4px);
    }
    
    .dashboard-menu-item.active::before {
        display: none;
    }
}