/* Import design tokens - MUST be first */
@import '_design-tokens.css';
/* Import consolidated button styles */
@import '_buttons.css';

/* Required asterisk styling - must be global to work with MarkupString */
.required-asterisk {
  color: var(--error-color) !important;
  font-weight: 600;
}

html {
  font-size: 14px;
}

@media (min-width: 769px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-body);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.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;
}

/* EditableFormInput global overrides - ensures styles apply regardless of scope */
.name-field-container .name-input-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
}

.name-field-container .name-input-row input,
.name-input-row input[type="text"],
.name-input-row input[type="email"],
input.name-text-input {
  box-sizing: border-box !important;
  display: block !important;
  padding: 10px 16px !important;
  width: 672px !important;
  height: 46px !important;
  background: rgba(240, 242, 245, 0.5) !important;
  border: 1px solid rgba(43, 127, 255, 0.15) !important;
  border-radius: 12px !important;
  font-family: 'Arial', sans-serif !important;
  font-size: 16px !important;
  line-height: 24px !important;
  color: #1A1F2E !important;
  outline: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}

/* Blazor Error UI - Hidden by default, shown only when an actual error occurs */
#blazor-error-ui {
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

/* Blazor Reconnection UI */
#components-reconnect-modal {
  display: none;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
  display: flex !important;
}

#components-reconnect-modal .components-reconnect-show {
  display: none;
}

#components-reconnect-modal .components-reconnect-failed {
  display: none;
}

#components-reconnect-modal .components-reconnect-rejected {
  display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-show {
  display: block !important;
}

#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed {
  display: block !important;
}

#components-reconnect-modal.components-reconnect-rejected .components-reconnect-rejected {
  display: block !important;
}

#components-reconnect-modal.components-reconnect-hide {
  display: none !important;
}

/* Global override for red X icons in password strength checker */
.password-strength-checker .icon-x,
.password-strength-checker .lucide-icon-wrapper.icon-x,
.password-strength-checker span.lucide-icon-wrapper.icon-x {
  color: var(--error-color) !important;
}

.password-strength-checker .lucide-icon-wrapper.icon-x svg,
.password-strength-checker .lucide-icon-wrapper.icon-x i,
.password-strength-checker .icon-x svg,
.password-strength-checker .icon-x i {
  color: var(--error-color) !important;
  stroke: var(--error-color) !important;
  fill: none !important;
}

[data-theme="dark"] .password-strength-checker .icon-x,
[data-theme="dark"] .password-strength-checker .lucide-icon-wrapper.icon-x,
[data-theme="dark"] .password-strength-checker span.lucide-icon-wrapper.icon-x {
  color: #f87171 !important;
}

[data-theme="dark"] .password-strength-checker .lucide-icon-wrapper.icon-x svg,
[data-theme="dark"] .password-strength-checker .lucide-icon-wrapper.icon-x i,
[data-theme="dark"] .password-strength-checker .icon-x svg,
[data-theme="dark"] .password-strength-checker .icon-x i {
  color: #f87171 !important;
  stroke: #f87171 !important;
  fill: none !important;
}

/* ============================================================================
   PROFILE HEADER BACK BUTTON - Dark Mode
   Applied globally to override Blazor scoped CSS limitations
   ============================================================================ */
[data-theme="dark"] .profile-header-back-container button,
[data-theme="dark"] .profile-header-back-container .icon-button {
  color: #ffffff;
}

[data-theme="dark"] .profile-header-back-container button svg,
[data-theme="dark"] .profile-header-back-container .icon-button svg,
[data-theme="dark"] .profile-header-back-container svg.lucide {
  color: #ffffff;
  stroke: #ffffff;
}

[data-theme="dark"] .profile-header-back-container button:hover,
[data-theme="dark"] .profile-header-back-container .icon-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================================================
   MOBILE RESPONSIVE STYLES (769px and below)
   Applied globally to override Blazor scoped CSS limitations
   ============================================================================ */

/* Desktop: show full text/description, hide mobile versions */
.desktop-text {
  display: inline;
}

.mobile-text {
  display: none;
}

.desktop-description {
  display: block;
}

.mobile-description {
  display: none;
}

@media (max-width: 768px) {

  /* Hide desktop text/description, show mobile versions */
  .desktop-text {
    display: none;
  }

  .mobile-text {
    display: inline;
  }

  .desktop-description {
    display: none;
  }

  .mobile-description {
    display: block;
  }

  /* Hide promotional background on mobile */
  .promotional-background,
  .promotional-overlay {
    display: none;
  }

  /* Promotional panel mobile styling */
  .promotional-panel {
    background-color: var(--bg-body);
    height: auto;
    min-height: auto;
  }

  /* Features list 2x2 grid */
  .features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    box-shadow: none;
  }

  /* Feature item mobile styling - horizontal layout with icon on left */
  .feature-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 0.5rem;
    margin-bottom: 0;
    padding: 0;
  }

  /* Feature icon wrapper mobile */
  .feature-icon-wrapper {
    flex-shrink: 0;
    box-shadow: none;
  }

  /* Feature text mobile styling */
  .feature-text {
    font-size: 0.8125rem;
    line-height: 1.3;
    font-weight: 400;
    text-align: left;
    color: var(--text-secondary);
  }

  /* Feature icon mobile sizing - applies to ALL icons including custom-icon */
  .feature-icon {
    width: 32px;
    height: 32px;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none;
  }

  .feature-icon svg {
    width: 100%;
    height: 100%;
  }
}

/* ============================================================================
   COMMON LOADING SPINNER
   ============================================================================ */
.reload-spinner-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: var(--feature-icon-bg);
  border-radius: 50%;
  color: var(--primary-color);
}

.reload-spinner-icon {
  width: 24px !important;
  height: 24px !important;
  animation: loading-spin 1.2s linear infinite;
}

@keyframes loading-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}