/* Fitly Web Site - Marketing & Account Pages
 * Loaded AFTER fitly-tokens.css. Only contains overrides
 * specific to the marketing site and web-only pages.
 * Brand tokens come from fitly-tokens.css.
 */

/* ==================== MARKETING SITE OVERRIDES ==================== */
:root {
  /* Marketing site uses a slightly different body bg for Apple-inspired look */
  --bs-body-bg: #fafafa;
  --bs-body-color: #1d1d1f;

  /* Card shadow system for marketing cards */
  --bs-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --bs-card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.08);

  /* Table theming */
  --bs-table-bg: #ffffff;
  --bs-table-striped-bg: rgba(0, 0, 0, 0.02);
  --bs-table-hover-bg: rgba(0, 0, 0, 0.04);

  /* Marketing nav/dropdown theming */
  --bs-nav-link-color: #1d1d1f;
  --bs-dropdown-bg: #ffffff;
  --bs-dropdown-link-color: #1d1d1f;
  --bs-dropdown-link-hover-bg: #f5f5f7;

  /* Input theming */
  --bs-input-border: rgba(0, 0, 0, 0.12);

  /* Modal theming */
  --bs-modal-bg: #ffffff;
  --bs-btn-close-filter: none;

  /* Marketing border radius (slightly tighter than app) */
  --bs-border-radius: 10px;
  --bs-border-radius-sm: 6px;
  --bs-border-radius-lg: 14px;
}

/* Dark Theme - Apple-inspired */
[data-bs-theme="dark"] {
  --bs-body-bg: #000000;
  --bs-body-color: #f5f5f7;
  --bs-card-bg: #1d1d1f;
  --bs-card-border-color: rgba(255, 255, 255, 0.08);
  --bs-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.4);
  --bs-card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
  --bs-table-bg: #1d1d1f;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
  --bs-border-color: rgba(255, 255, 255, 0.1);
  --bs-nav-link-color: #f5f5f7;
  --bs-dropdown-bg: #1d1d1f;
  --bs-dropdown-link-color: #f5f5f7;
  --bs-dropdown-link-hover-bg: #2c2c2e;
  --bs-input-bg: #1d1d1f;
  --bs-input-border: rgba(255, 255, 255, 0.15);
  --bs-modal-bg: #1d1d1f;
  --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
}

/* ==================== GLOBAL STYLES ==================== */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-family: var(--bs-font-sans-serif);
  font-size: 15px;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; line-height: 1.1; }
h2 { font-size: 2rem; line-height: 1.125; }
h3 { font-size: 1.75rem; line-height: 1.14286; }
h4 { font-size: 1.5rem; line-height: 1.16667; }
h5 { font-size: 1.25rem; line-height: 1.2; }
h6 { font-size: 1rem; line-height: 1.25; }

/* ==================== HERO SECTION ==================== */
.hero {
  background: linear-gradient(135deg, var(--fitly-primary) 0%, var(--fitly-primary-dark) 100%) !important;
  padding: 80px 0;
  color: white !important;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: white !important;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero .lead {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.9) !important;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.hero small {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 14px;
}

/* ==================== BUTTONS ==================== */
.btn {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 10px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--fitly-primary) 0%, var(--fitly-primary-dark) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(3, 169, 245, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--fitly-primary-light) 0%, var(--fitly-primary) 100%);
  box-shadow: 0 4px 16px rgba(3, 169, 245, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline-primary {
  color: var(--fitly-primary);
  border: 1.5px solid var(--fitly-primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--fitly-primary);
  border-color: var(--fitly-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(3, 169, 245, 0.25);
}

.btn-secondary {
  background-color: var(--bs-dropdown-link-hover-bg);
  color: var(--bs-body-color);
}

.btn-secondary:hover {
  background-color: var(--bs-border-color);
  color: var(--bs-body-color);
}

/* ==================== HERO BUTTON OVERRIDES ==================== */
/* The hero background is the same blue as btn-primary / btn-outline-primary.
   Re-skin both variants so they are always legible on the hero gradient. */
.hero .btn-primary,
.hero .btn-primary:visited {
  background: #ffffff;
  background-image: none;
  color: var(--fitly-primary-dark);
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.hero .btn-primary:hover,
.hero .btn-primary:focus-visible {
  background: rgba(255, 255, 255, 0.92);
  color: var(--fitly-primary-dark);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.hero .btn-primary:active {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(0);
}

.hero .btn-outline-primary,
.hero .btn-outline-primary:visited {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  box-shadow: none;
}

.hero .btn-outline-primary:hover,
.hero .btn-outline-primary:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.hero .btn-outline-primary:active {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(0);
}

/* ==================== CARDS ==================== */
.card {
  background-color: var(--bs-card-bg);
  border: 1px solid var(--bs-card-border-color);
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--bs-card-shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--bs-border-color);
  padding: 20px 24px;
  font-weight: 600;
  font-size: 17px;
}

.card-body {
  padding: 24px;
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid var(--bs-border-color);
  padding: 16px 24px;
}

/* Feature Cards */
.feature-card {
  border: none;
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bs-card-shadow-hover);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--fitly-primary) 0%, var(--fitly-primary-dark) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* Testimonial Cards */
.testimonial-card {
  border: none;
  background: var(--bs-card-bg);
  border-radius: var(--bs-border-radius);
  padding: 2rem;
  height: 100%;
  box-shadow: var(--bs-card-shadow);
}

.testimonial-quote {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--bs-body-color);
}

.testimonial-author {
  font-weight: 600;
  color: var(--fitly-primary);
}

/* ==================== CTA SECTIONS ==================== */
.cta-section {
  background: linear-gradient(135deg, var(--fitly-primary) 0%, var(--fitly-primary-dark) 100%);
  color: white;
  padding: 80px 0;
}

.cta-section .btn-outline-light:hover {
  background-color: white;
  color: var(--fitly-primary);
}

/* ==================== UTILITY CLASSES ==================== */
.bg-fitly-primary {
  background-color: var(--fitly-primary) !important;
}

.bg-fitly-light {
  background-color: var(--bs-body-bg) !important;
}

.text-fitly-primary {
  color: var(--fitly-primary) !important;
}

.text-primary {
  color: var(--fitly-primary) !important;
}

/* SVG Checkmark Icons */
.check-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: var(--bs-success);
  flex-shrink: 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
}

/* ==================== NAVIGATION ==================== */
.navbar-brand {
  font-family: 'Bangers', cursive !important;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--bs-body-color) !important;
  transition: opacity 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.7;
}

/* Fitly Logo Styling */
.fitly-logo {
  font-family: 'Bangers', cursive !important;
  font-size: 1.75rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--fitly-primary) !important;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
  display: inline-block;
}

.fitly-logo:hover {
  opacity: 0.85;
  color: var(--fitly-primary) !important;
}

.fitly-logo-suffix {
  color: var(--fitly-primary) !important;
}

.nav-link {
  color: var(--bs-nav-link-color) !important;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 14px !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: var(--bs-dropdown-link-hover-bg);
  color: var(--fitly-primary) !important;
}

.nav-link.active {
  font-weight: 500;
  color: var(--fitly-primary) !important;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 2000;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
  box-shadow: var(--fitly-shadow-md);
}

.skip-link:focus {
  top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  .dropdown-menu,
  .reconnect-spinner {
    animation: none !important;
  }

  .fitly-logo,
  .nav-link,
  .btn,
  .form-control,
  .form-select {
    transition: none !important;
  }
}

/* ==================== FORMS ==================== */
.form-control,
.form-select {
  background-color: var(--bs-input-bg);
  border: 1.5px solid var(--bs-input-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--bs-body-color);
  transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--bs-input-bg);
  border-color: var(--fitly-primary);
  box-shadow: 0 0 0 4px rgba(3, 169, 245, 0.1);
  color: var(--bs-body-color);
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--bs-body-color);
}

.form-check-input {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--bs-input-border);
  border-radius: 5px;
}

.form-check-input:checked {
  background-color: var(--fitly-primary);
  border-color: var(--fitly-primary);
}

/* Form Validation */
h1:focus {
  outline: none;
}

.valid.modified:not([type=checkbox]) {
  outline: 1px solid var(--bs-success);
}

.invalid {
  outline: 1px solid var(--bs-danger);
}

.validation-message {
  color: var(--bs-danger);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.darker-border-checkbox.form-check-input {
  border-color: var(--fitly-text-muted);
}

/* ==================== ALERTS ==================== */
.alert {
  border-radius: 10px;
  border: none;
  padding: 16px 20px;
  font-size: 14px;
}

[data-bs-theme="light"] .alert-info,
:root .alert-info {
  background-color: var(--fitly-info-light);
  color: var(--bs-info);
}

[data-bs-theme="light"] .alert-success,
:root .alert-success {
  background-color: var(--fitly-success-light);
  color: var(--bs-success);
}

[data-bs-theme="light"] .alert-warning,
:root .alert-warning {
  background-color: var(--fitly-warning-light);
  color: var(--fitly-warning-dark);
}

[data-bs-theme="light"] .alert-danger,
:root .alert-danger {
  background-color: var(--fitly-danger-light);
  color: var(--bs-danger);
}

[data-bs-theme="dark"] .alert-info {
  background-color: rgba(3, 169, 245, 0.15);
  color: #4fc3f7;
  border: 1px solid rgba(3, 169, 245, 0.3);
}

[data-bs-theme="dark"] .alert-success {
  background-color: rgba(76, 175, 80, 0.15);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

[data-bs-theme="dark"] .alert-warning {
  background-color: rgba(255, 152, 0, 0.15);
  color: #ffb74d;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

[data-bs-theme="dark"] .alert-danger {
  background-color: rgba(244, 67, 54, 0.15);
  color: #e57373;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ==================== MODALS ==================== */
.modal {
  z-index: 1055 !important;
}

.modal-backdrop {
  z-index: 1050 !important;
  background-color: var(--fitly-modal-backdrop);
}

.modal-backdrop.show {
  opacity: 1;
}

.modal-content {
  background-color: var(--bs-modal-bg);
  border: 1px solid var(--bs-card-border-color);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .modal-content {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.15);
}

.modal-header {
  border-bottom: 1px solid var(--bs-border-color);
  padding: 24px;
}

.modal-title {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--bs-body-color);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--bs-border-color);
  padding: 20px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal .btn-close {
  filter: var(--bs-btn-close-filter);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.modal .btn-close:hover {
  opacity: 1;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== LOADING STATES ==================== */
.btn.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */

/* Tablet landscape and below */
@media (max-width: 991px) {
  .hero {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero .lead {
    font-size: 1.25rem;
  }

  .cta-section {
    padding: 60px 0;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  h3 { font-size: 1.625rem; }

  .display-1 { font-size: 3.5rem; }
  .display-4 { font-size: 2rem; }
  .display-6 { font-size: 1.25rem; }
}

/* Tablet portrait and below */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }

  .hero {
    padding: 48px 0;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero .lead {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

  .cta-section {
    padding: 48px 0;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }

  .cta-section .lead {
    font-size: 1rem;
  }

  .card-body {
    padding: 20px;
  }

  .card-header {
    padding: 16px 20px;
  }

  .card-footer {
    padding: 12px 20px;
  }

  .display-1 { font-size: 3rem; }
  .display-4 { font-size: 1.75rem; }

  .py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .mb-5 {
    margin-bottom: 2rem !important;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  .testimonial-quote {
    font-size: 1rem;
  }

  .feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
  }
}

/* Small phones */
@media (max-width: 576px) {
  .hero {
    padding: 36px 0;
  }

  .hero h1 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
  }

  .hero .lead {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }

  .hero .btn-lg {
    padding: 10px 18px;
    font-size: 14px;
  }

  .cta-section {
    padding: 36px 0;
  }

  .cta-section .btn-lg {
    padding: 10px 18px;
    font-size: 14px;
  }

  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.125rem; }

  .display-1 { font-size: 2.5rem; }

  .lead {
    font-size: 1rem;
  }

  .btn-lg {
    padding: 10px 18px;
    font-size: 14px;
  }

  .feature-card {
    padding: 1.25rem;
  }

  .testimonial-card {
    padding: 1.25rem;
  }

  .testimonial-quote {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .card-body {
    padding: 16px;
  }

  .card-header {
    padding: 14px 16px;
    font-size: 15px;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 14px 16px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bs-body-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--bs-border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fitly-primary);
}

/* ==================== UTILITIES ==================== */
.glass-effect {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

[data-bs-theme="dark"] .glass-effect {
  background: rgba(29, 29, 31, 0.8);
}

.text-gradient {
  background: linear-gradient(135deg, var(--fitly-primary) 0%, var(--fitly-primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted {
  color: var(--bs-body-color) !important;
  opacity: 0.65;
}

.text-body {
  color: var(--bs-body-color) !important;
}

/* ==================== ERROR BOUNDARY ==================== */
.blazor-error-boundary {
  background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
  padding: 1rem 1rem 1rem 3.7rem;
  color: white;
}

.blazor-error-boundary::after {
  content: "An error has occurred."
}

/* ==================== BLAZOR RECONNECTION UI ==================== */
/* Blazor assigns CSS classes to #components-reconnect-modal:
   components-reconnect-show    - circuit lost, reconnecting
   components-reconnect-hide    - connected / not applicable
   components-reconnect-failed  - all retries exhausted
   components-reconnect-rejected - server rejected reconnection */

#components-reconnect-modal {
  display: none;
}

#components-reconnect-modal.components-reconnect-show {
  display: block;
}

#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
  display: block;
}

.reconnect-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.reconnect-card {
  background: var(--bs-card-bg, #ffffff);
  border-radius: 16px;
  padding: 32px 40px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  max-width: 340px;
  width: 90vw;
}

.reconnect-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--bs-border-color, #dee2e6);
  border-top-color: var(--fitly-primary, #03A9F5);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: reconnect-spin 0.8s linear infinite;
}

/* Hide spinner when failed / rejected and show reload prompt instead */
#components-reconnect-modal.components-reconnect-failed .reconnect-spinner,
#components-reconnect-modal.components-reconnect-rejected .reconnect-spinner {
  display: none;
}

#components-reconnect-modal.components-reconnect-failed .reconnect-message::after,
#components-reconnect-modal.components-reconnect-rejected .reconnect-message::after {
  content: "Connection lost. Please reload the page.";
}

#components-reconnect-modal.components-reconnect-failed .reconnect-message,
#components-reconnect-modal.components-reconnect-rejected .reconnect-message {
  font-size: 0;
}

#components-reconnect-modal.components-reconnect-failed .reconnect-submessage,
#components-reconnect-modal.components-reconnect-rejected .reconnect-submessage {
  display: none;
}

.reconnect-message {
  font-size: 15px;
  font-weight: 600;
  color: var(--bs-body-color, #212529);
  margin: 0 0 4px;
}

.reconnect-submessage {
  font-size: 13px;
  color: var(--bs-secondary, #6c757d);
  margin: 0;
}

@keyframes reconnect-spin {
  to { transform: rotate(360deg); }
}

[data-bs-theme="dark"] .reconnect-card {
  background: #1d1d1f;
}

[data-bs-theme="dark"] .reconnect-overlay {
  background: rgba(0, 0, 0, 0.55);
}

/* ==================== DARK THEME OVERRIDES ==================== */
[data-bs-theme="dark"] .bg-light {
  background-color: #2c2c2e !important;
}

[data-bs-theme="dark"] .text-muted {
  color: var(--bs-body-color) !important;
  opacity: 0.65;
}

[data-bs-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* ==================== BLOG CONTENT STYLES ==================== */
.blog-content {
  font-size: 17px;
  line-height: 1.7;
  color: var(--bs-body-color);
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--bs-body-color);
}

.blog-content h1 { font-size: 2.25rem; }
.blog-content h2 { font-size: 1.875rem; }
.blog-content h3 { font-size: 1.5rem; }
.blog-content h4 { font-size: 1.25rem; }
.blog-content h5 { font-size: 1.125rem; }
.blog-content h6 { font-size: 1rem; }

.blog-content p {
  margin-bottom: 1.25rem;
  color: var(--bs-body-color);
}

.blog-content a {
  color: var(--fitly-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(3, 169, 245, 0.3);
  transition: border-color 0.2s ease;
}

.blog-content a:hover {
  border-bottom-color: var(--fitly-primary);
}

.blog-content ul,
.blog-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.blog-content li {
  margin-bottom: 0.5rem;
}

.blog-content blockquote {
  border-left: 4px solid var(--fitly-primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--bs-body-color);
  opacity: 0.85;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--bs-border-radius);
  margin: 1.5rem 0;
}

.blog-content pre {
  background-color: var(--bs-card-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-content code {
  background-color: var(--bs-card-bg);
  border: 1px solid var(--bs-border-color);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--bs-body-color);
}

.blog-content pre code {
  background-color: transparent;
  border: none;
  padding: 0;
}

.blog-content table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  overflow: hidden;
}

.blog-content table th,
.blog-content table td {
  padding: 0.75rem;
  border: 1px solid var(--bs-border-color);
  text-align: left;
}

.blog-content table th {
  background-color: var(--bs-card-bg);
  font-weight: 600;
}

.blog-content table tr:nth-child(even) {
  background-color: var(--bs-table-striped-bg);
}

.blog-content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--bs-border-color);
}

/* Dark theme adjustments for blog content */
[data-bs-theme="dark"] .blog-content blockquote {
  opacity: 0.8;
}

[data-bs-theme="dark"] .blog-content pre {
  background-color: #0d0d0d;
}

[data-bs-theme="dark"] .blog-content code {
  background-color: #1a1a1a;
}

/* ==================== ACCOUNT PAGES ==================== */
.account-settings-wrapper {
  min-height: 60vh;
}

.account-page-content {
  animation: fadeIn 0.3s ease;
}

.account-page-content h2 {
  font-weight: 600;
  color: var(--bs-body-color);
}

.account-page-content .form-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--bs-body-color);
}

.account-page-content .form-control {
  border-radius: 8px;
  border: 1.5px solid var(--bs-input-border);
  padding: 10px 14px;
  font-size: 15px;
  transition: all 0.2s ease;
}

.account-page-content .form-control:focus {
  border-color: var(--fitly-primary);
  box-shadow: 0 0 0 4px rgba(3, 169, 245, 0.1);
}

.account-page-content .form-control:disabled {
  background-color: var(--bs-dropdown-link-hover-bg);
  opacity: 0.7;
}

.account-page-content .form-text {
  font-size: 13px;
  color: var(--bs-body-color);
  opacity: 0.7;
  margin-top: 6px;
}

.account-page-content .btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.account-page-content .btn i {
  opacity: 0.9;
}

/* Status messages */
.account-page-content .alert {
  border-radius: 10px;
  border: none;
  font-size: 14px;
}

/* Subscription page specific styles */
.account-page-content .card {
  border-radius: 12px;
  transition: all 0.3s ease;
}

.account-page-content .card:hover {
  transform: translateY(-2px);
}

.account-page-content .accordion-button {
  font-weight: 500;
  font-size: 14px;
}

.account-page-content .accordion-button:not(.collapsed) {
  background-color: var(--bs-dropdown-link-hover-bg);
  color: var(--fitly-primary);
}

.account-page-content .accordion-body {
  font-size: 14px;
  color: var(--bs-body-color);
  opacity: 0.9;
}

/* ==================== MOBILE APP MODAL ==================== */
#mobileAppModal .mobile-app-modal-content {
  border-radius: 24px;
  overflow: hidden;
  padding: 0;
}

#mobileAppModal .modal-content {
    max-width: initial;
}

#mobileAppModal .modal-xl {
    max-width: 1200px;
}

#mobileAppModal .modal-header {
  padding: 0;
  z-index: 10;
}
#mobileAppModal .modal-body {
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: none;
}

#mobileAppModal .modal-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0 0 0.1rem 0;
  border: none;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

#mobileAppModal .modal-close-btn:hover {
  background-color: rgba(0, 0, 0, 0.65);
  transform: rotate(90deg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Left side with gradient background */
#mobileAppModal .mobile-app-modal-left {
  background: linear-gradient(135deg, #03A9F5 0%, #0288D1 100%);
  position: relative;
  overflow: hidden;
}

#mobileAppModal .mobile-app-modal-left::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

#mobileAppModal .mobile-modal-phone {
  position: relative;
  z-index: 2;
  animation: floatPhone 3s ease-in-out infinite;
}

@keyframes floatPhone {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Right side content */
#mobileAppModal .mobile-app-modal-right {
  background: linear-gradient(180deg, rgba(3, 169, 245, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
  padding: 3rem 2rem;
}

[data-bs-theme="dark"] #mobileAppModal .mobile-app-modal-right {
  background: linear-gradient(180deg, rgba(3, 169, 245, 0.08) 0%, var(--bs-modal-bg) 100%);
}

/* Badge */
#mobileAppModal .bg-primary-gradient {
  background: linear-gradient(135deg, var(--fitly-primary) 0%, var(--fitly-primary-dark) 100%);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  display: inline-block;
}

/* Title with gradient */
#mobileAppModal .modal-title-gradient {
  background: linear-gradient(135deg, var(--fitly-primary) 0%, var(--fitly-primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* App download cards */
#mobileAppModal .app-download-card {
  background: var(--bs-card-bg);
  border: 2px solid var(--bs-border-color);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#mobileAppModal .app-download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fitly-primary) 0%, var(--fitly-primary-dark) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#mobileAppModal .app-download-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(3, 169, 245, 0.15);
  border-color: var(--fitly-primary);
}

#mobileAppModal .app-download-card:hover::before {
  opacity: 1;
}

/* Platform icons */
#mobileAppModal .platform-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s ease;
}

#mobileAppModal .apple-icon {
  background: linear-gradient(135deg, #000000 0%, #2c2c2e 100%);
  color: white;
}

#mobileAppModal .google-icon {
  background: linear-gradient(135deg, #4285F4 0%, #34A853 50%, #FBBC05 75%, #EA4335 100%);
  color: white;
}

#mobileAppModal .app-download-card:hover .platform-icon {
  transform: scale(1.1) rotate(5deg);
}

/* QR Code container */
#mobileAppModal .qr-code-container {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

#mobileAppModal .app-download-card:hover .qr-code-container {
  transform: scale(1.05);
}

#mobileAppModal .qr-code-img {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 8px;
}

/* App store buttons */
#mobileAppModal .btn-app-store {
  background: linear-gradient(135deg, var(--fitly-primary) 0%, var(--fitly-primary-dark) 100%);
  border: none;
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#mobileAppModal .btn-app-store::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

#mobileAppModal .btn-app-store:hover::before {
  width: 300px;
  height: 300px;
}

#mobileAppModal .btn-app-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(3, 169, 245, 0.3);
}

/* Feature pills */
#mobileAppModal .feature-pill {
  background: var(--bs-card-bg);
  border: 1.5px solid var(--bs-border-color);
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  white-space: nowrap;
}

#mobileAppModal .feature-pill:hover {
  background: linear-gradient(135deg, rgba(3, 169, 245, 0.05) 0%, rgba(2, 136, 209, 0.05) 100%);
  border-color: var(--fitly-primary);
  transform: translateY(-2px);
}

#mobileAppModal .feature-pill i {
  font-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  #mobileAppModal .mobile-app-modal-left {
    min-height: 400px;
  }
  
  #mobileAppModal .mobile-modal-phone {
    max-height: 350px !important;
  }
  
  #mobileAppModal .mobile-app-modal-right {
    padding: 2rem 1.5rem;
  }
  
  #mobileAppModal .modal-title-gradient {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  #mobileAppModal .mobile-app-modal-left {
    display: none;
  }
  
  #mobileAppModal .mobile-app-modal-right {
    padding: 3rem 2rem;
  }
  
  #mobileAppModal .feature-pill {
    font-size: 12px;
    padding: 8px 12px;
  }
}

@media (max-width: 576px) {
  #mobileAppModal .modal-xl {
    margin: 0.5rem;
  }

  #mobileAppModal .mobile-app-modal-right {
    padding: 2rem 1.5rem;
  }

  #mobileAppModal .app-download-card {
    padding: 1.5rem !important;
  }

  #mobileAppModal .modal-title-gradient {
    font-size: 1.75rem;
  }
}

/* ==================== SITE FOOTER ==================== */
.site-footer {
  background-color: var(--bs-card-bg);
  border-top: 1px solid var(--bs-border-color);
  margin-top: auto;
  padding: 2rem 0 1.5rem;
}

.site-footer-resources {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.site-footer-heading {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bs-body-color);
  opacity: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.site-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--bs-body-color);
  opacity: 0.72;
}

.site-footer-links-group {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.site-footer-links-group-right {
  justify-content: flex-end;
}

.site-footer-link {
  color: var(--bs-body-color);
  opacity: 0.72;
  font-size: 0.875rem;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
  opacity: 1;
  color: var(--fitly-primary);
}

@media (max-width: 767px) {
  .site-footer {
    padding: 1.5rem 0 1.25rem;
  }

  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .site-footer-links-group,
  .site-footer-links-group-right {
    justify-content: flex-start;
  }
}
