/* VTC Dashboard Main Styles */

/* Self-Hosted Plus Jakarta Sans (Variable Font, 400-800, zero render-blocking Google trip) */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Scaled exactly 10% larger for comfortable viewing */
html {
  font-size: 110%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Custom dark scrollbar with yellow hover accent */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #090a0c;
}

::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #facc15;
}


/* GPU Pre-Warmed Settings Modal: Pre-rasterized in GPU VRAM for sub-millisecond response */
#settings-modal-backdrop {
  display: flex !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.975);
  transition: opacity 0.12s cubic-bezier(0.16, 1, 0.3, 1), transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.12s;
  will-change: opacity, transform;
}

#settings-modal-backdrop.modal-open {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: scale(1) !important;
}

/* Minimal Centered Swish Loader */
#page-loader {
  will-change: opacity;
  contain: paint;
}

@keyframes loader-swish {
  0% {
    transform: translateX(-130%) scaleX(0.3);
    opacity: 0.4;
  }
  40% {
    opacity: 1;
  }
  50% {
    transform: translateX(10%) scaleX(0.75);
  }
  100% {
    transform: translateX(130%) scaleX(0.3);
    opacity: 0.4;
  }
}

.loader-track {
  position: relative;
  width: 12rem;
  height: 2.5px;
  background-color: #262626;
  border-radius: 9999px;
  overflow: hidden;
}

.loader-swish {
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: #facc15;
  border-radius: 9999px;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.7);
  animation: loader-swish 0.85s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Real-Time Hardware-Accelerated Performance Optimizations */
.rt-card {
  contain: layout style;
  content-visibility: auto;
}

.rt-smooth-bar {
  will-change: width, transform;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes rt-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

/* Settings Nav Tab Dynamic Icon Motion & Spring Hover */
.tab-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.tab-icon-wrap svg {
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease, fill 0.15s ease;
  will-change: transform;
}

/* Keyframe spring physics triggered whenever any sidebar tab is clicked */
@keyframes tab-icon-spring {
  0% {
    transform: scale(0.8);
  }
  45% {
    transform: scale(1.25);
  }
  75% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1.1);
  }
}

.tab-icon-bounce {
  animation: tab-icon-spring 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Bread Toast Notifications: Bottom-Right with Theme Countdown Timer Line (No Side Color Bar) */
#toast-bread-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
  max-width: 24rem;
  width: calc(100% - 2.5rem);
}

.toast-bread-item {
  position: relative;
  min-width: 280px;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toast-enter 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.toast-bread-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.toast-bread-item.toast-exit {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  pointer-events: none;
}

/* Bottom timer countdown progress bar */
.toast-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.toast-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  animation: toast-timer linear forwards;
}

.toast-progress-green { background-color: #34d399; }
.toast-progress-red { background-color: #f87171; }
.toast-progress-orange { background-color: #fb923c; }
.toast-progress-yellow { background-color: #facc15; }

@keyframes toast-enter {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-timer {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

/* Universal Theme Swatches: Upgraded Premium Interaction & Attached PRO Status Tags */
.theme-swatch-btn {
  position: relative;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease, border-color 0.22s ease;
  user-select: none;
}

.theme-swatch-btn:hover {
  transform: translateY(-2px);
  opacity: 1 !important;
  filter: brightness(1.12) !important;
}

.theme-swatch-btn:active {
  transform: translateY(0);
}

.theme-check-icon {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-swatch-btn.is-active {
  opacity: 1 !important;
  filter: brightness(1.06) !important;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
}

.theme-swatch-btn.is-active .theme-check-icon {
  opacity: 1;
  transform: scale(1);
}

/* Shake animation for invalid OTP submission */
@keyframes otp-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.animate-shake {
  animation: otp-shake 0.35s ease-in-out;
}

/* Locked PRO theme swatches: compact 15px status tag, secondary tone, brightens gently on hover */
.theme-swatch-btn[data-theme-pro="true"].is-locked {
  position: relative;
}

.theme-swatch-btn[data-theme-pro="true"].is-locked::before {
  content: "";
  position: absolute;
  inset: 0;
  bottom: 14px;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
  border-top-left-radius: 9px;
  border-top-right-radius: 9px;
  transition: background 0.18s ease;
}

.theme-swatch-btn[data-theme-pro="true"].is-locked:hover::before {
  background: rgba(0, 0, 0, 0.25);
}

.theme-swatch-btn[data-theme-pro="true"].is-locked .theme-pro-tag {
  background: rgba(12, 12, 12, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.theme-swatch-btn[data-theme-pro="true"].is-locked .theme-lock-icon {
  color: rgba(234, 179, 8, 0.85);
  transition: color 0.18s ease;
}

.theme-swatch-btn[data-theme-pro="true"].is-locked .theme-pro-tag span {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.18s ease;
}

.theme-swatch-btn[data-theme-pro="true"].is-locked:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.theme-swatch-btn[data-theme-pro="true"].is-locked:hover .theme-lock-icon {
  color: #facc15;
}

.theme-swatch-btn[data-theme-pro="true"].is-locked:hover .theme-pro-tag span {
  color: #ffffff;
}

/* Settings Modal Split Layout: Strict 208px Sidebar + Usable Right Panel */
#settings-modal-backdrop .settings-modal-card {
  display: flex !important;
  flex-direction: row !important;
}

#settings-modal-sidebar {
  width: 208px !important;
  min-width: 208px !important;
  max-width: 208px !important;
  flex-shrink: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-bottom: none !important;
}

/* Completely eliminate white circles / button borders in settings navigation */
#btn-settings-tab-profile,
#btn-settings-tab-connections,
#btn-settings-tab-trackers,
#btn-settings-tab-billing,
#btn-settings-logout {
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.border-transparent {
  border-color: transparent !important;
}

/* Searchable Dropdown & Select Inputs: Deliberate dark styling without text highlight or focus flash */
.searchable-select-input {
  background-color: #151515 !important;
  border: 1px solid #2c2c2c !important;
  color: #f5f5f5 !important;
  outline: none !important;
  box-shadow: none !important;
}

.searchable-select-input::selection {
  background: transparent !important;
  color: #f5f5f5 !important;
}

.searchable-select-input:hover {
  border-color: #3f3f46 !important;
}

.searchable-select-input:focus,
.searchable-select-input:focus-visible {
  border-color: #52525b !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Visibility Dropdown Button */
.visibility-select-btn {
  width: 124px !important;
  height: 38px !important;
  min-width: 124px !important;
  min-height: 38px !important;
  background-color: #151515 !important;
  border: 1px solid #2c2c2c !important;
  color: #e5e5e5 !important;
  outline: none !important;
  box-shadow: none !important;
}

.visibility-select-btn:hover {
  border-color: #3f3f46 !important;
  color: #ffffff !important;
}

.visibility-select-btn:focus,
.visibility-select-btn:focus-visible {
  border-color: #52525b !important;
  outline: none !important;
}

/* Billing Plan Card Headings & Badge Alignment */
.billing-carousel-card h4 {
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em !important;
  word-spacing: normal !important;
  margin: 0 !important;
}

.billing-current-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 6px;
  border-width: 1px;
  border-style: solid;
}

/* Inline Display Name Edit & Square Round-Edged Action Buttons */
#settings-name-edit-wrap:not(.hidden) {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 6px !important;
}

#settings-name-edit-wrap.hidden {
  display: none !important;
}

#settings-input-display-name {
  height: 38px !important;
  width: 240px !important;
  max-width: 100% !important;
  background-color: #151515 !important;
  border: 1px solid #2c2c2c !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  outline: none !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4) !important;
  transition: border-color 0.15s ease !important;
  box-sizing: border-box !important;
}

#settings-input-display-name:focus {
  border-color: var(--theme-accent, #facc15) !important;
  box-shadow: 0 0 0 1px var(--theme-accent, #facc15), inset 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

#btn-save-inline-name,
#btn-cancel-inline-name {
  height: 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  transition: all 0.15s ease !important;
}

#btn-save-inline-name {
  background-color: var(--theme-accent, #facc15) !important;
  border: 1px solid var(--theme-accent-border, rgba(250, 204, 21, 0.4)) !important;
  color: var(--theme-text-on-accent, #09090b) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}

#btn-save-inline-name:hover {
  background-color: var(--theme-accent-hover, #fde047) !important;
  border-color: var(--theme-accent, #facc15) !important;
}

#btn-save-inline-name:active {
  transform: scale(0.95);
}

#btn-cancel-inline-name {
  background-color: #1e1e1e !important;
  border: 1px solid #333333 !important;
  color: #d4d4d4 !important;
}

#btn-cancel-inline-name:hover {
  background-color: #262626 !important;
  color: #ffffff !important;
  border-color: #525252 !important;
}

#btn-cancel-inline-name:active {
  transform: scale(0.95);
}

#btn-save-inline-name svg {
  width: 18.5px !important;
  height: 18.5px !important;
  stroke: var(--theme-text-on-accent, #09090b) !important;
  color: var(--theme-text-on-accent, #09090b) !important;
  flex-shrink: 0 !important;
}

#btn-cancel-inline-name svg {
  width: 18.5px !important;
  height: 18.5px !important;
  flex-shrink: 0 !important;
}

/* Tracker Requirement & Configuration Modal */
#tracker-config-modal-backdrop .tracker-modal-card,
.tracker-modal-card {
  border-radius: 20px !important;
  -webkit-border-radius: 20px !important;
  background-color: #171717 !important;
  border: 1px solid #2b2b2b !important;
  overflow: hidden !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55) !important;
}

