  svg text {
  font-family: "Isento-Bold";
}

/* Language Detection UI Styles */
.language-switcher {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.language-switcher.show {
  transform: translateY(0);
}

.language-switcher-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.language-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.language-text {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.language-suggestion {
  font-size: 13px;
  color: #6b7280;
}

.language-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.language-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.language-btn-switch {
  background: #166534;
  color: white;
}

.language-btn-switch:hover {
  background: #15803d;
}

.language-btn-dismiss {
  background: #f3f4f6;
  color: #6b7280;
}

.language-btn-dismiss:hover {
  background: #e5e7eb;
  color: #374151;
}

.language-btn-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
  margin-left: 8px;
}

.language-btn-close:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Floating Language Selector Styles */
.floating-language-selector {
  position: fixed;
  bottom: 80px;
  left: 20px;
  z-index: 10001;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.language-reset-btn {
  position: fixed;
  bottom: 80px;
  left: 20px;
  z-index: 10002;
  height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  background: #6b7280;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}
.language-reset-btn:hover {
  background: #4b5563;
  transform: translateY(-2px);
}

.language-selector-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #166534;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.3);
  transition: all 0.2s ease;
  outline: none;
}

.language-selector-btn:hover {
  background: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 101, 52, 0.4);
}

.language-selector-btn:active {
  transform: translateY(0);
}

.language-icon {
  width: 20px;
  height: 20px;
}

.current-lang {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.language-selector-panel {
  position: absolute;
  bottom: 70px;
  left: 0;
  width: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid #e5e7eb;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: all 0.2s ease;
  max-height: 400px;
  overflow: hidden;
}

.language-selector-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}


.language-selector-header {
  padding: 20px 20px 0px 10px;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}
.language-selector-header.pb-1 { padding-bottom: 10px; }

.language-selector-header p { margin: 0 10px 10px 10px; }


.language-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-right: 40px; /* Add space for close button */
}

.welcome-message {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.logout-link {
  font-size: 13px;
  color: #dc2626;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.logout-link:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.language-selector-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 40px; /* Add space for close button */
}

.close-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  line-height: 1;
  position: absolute;
  top: 16px;
  right: 20px;
}

.close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.language-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.language-header-actions h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.change-languages-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.change-languages-btn:hover {
  background-color: #f3f4f6;
  color: #166534;
}

.edit-icon {
  width: 16px;
  height: 16px;
}

.language-search-container {
  position: relative;
  padding: 5px 20px;
  border-bottom: 1px solid #f3f4f6;
}

.language-search {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.language-search:focus {
  border-color: #166534;
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

.search-icon {
  position: absolute;
  left: 32px;
  top: 43%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9ca3af;
}

.language-list {
  max-height: 210px;
  overflow-y: auto;
  padding: 8px 0;
  /*padding-bottom: 40px;*/
}

.language-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
  color: #374151;
}

.language-item:hover {
  background-color: #f9fafb;
}

.language-item.active {
  background-color: #f0fdf4;
  color: #166534;
  font-weight: 500;
}

.language-item .flag {
  width: 20px;
  height: 15px;
  margin-right: 12px;
  border-radius: 2px;
  object-fit: cover;
}

.language-item .language-name {
  flex: 1;
}

.language-item .language-native {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .floating-language-selector {
    bottom: 16px;
    left: 16px;
  }

  .language-reset-btn {
    bottom: 16px;
    left: 16px;
  }

  .language-selector-panel {
    width: 280px;
    left: -10px;
  }

  .language-selector-btn {
    width: 48px;
    height: 48px;
  }

  .language-icon {
    width: 18px;
    height: 18px;
  }

  .current-lang {
    font-size: 9px;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .language-switcher-content {
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    text-align: center;
  }

  .language-info {
    align-items: center;
  }

  .language-actions {
    width: 100%;
    justify-content: center;
  }

  .language-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .language-switcher-content {
    padding: 14px 16px;
  }

  .language-text {
    font-size: 13px;
  }

  .language-suggestion {
    font-size: 12px;
  }

  .language-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* User Registration Modal Styles */
.reg-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10003;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.reg-modal.show {
  display: block;
}

.reg-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.reg-modal-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.reg-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
}

.reg-modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.reg-modal-close {
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.reg-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.reg-modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
}

/* Step Indicator */
.reg-step-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.reg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.reg-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
}

.reg-step.active .reg-step-number {
  background: #166534;
  color: white;
}

.reg-step-label {
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  transition: color 0.3s ease;
}

.reg-step.active .reg-step-label {
  color: #166534;
}

.reg-step-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin: 0 8px;
  align-self: start;
  margin-top: 20px;
}

/* Step Content */
.reg-steps-container {
  position: relative;
}

.reg-step-content {
  animation: fadeIn 0.3s ease;
}

.reg-step-content.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reg-step-title {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.reg-step-description {
  margin: 0 0 24px 0;
  font-size: 14px;
  color: #6b7280;
}

/* Form Elements */
.reg-form-group {
  margin-bottom: 20px;
}

.reg-form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.reg-required {
  color: #dc2626;
}

.reg-optional {
  color: #9ca3af;
  font-weight: 400;
}

.reg-form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  background: white;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.reg-form-select {
  width: 100%;
  /*padding: 12px 40px 12px 16px;*/
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  background: white;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.reg-form-select option {
  padding: 8px;
  font-size: 14px;
}

.reg-form-input:focus,
.reg-form-select:focus {
  outline: none;
  border-color: #166534;
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

.reg-form-input::placeholder {
  color: #9ca3af;
}

.reg-otp-input {
  text-align: center;
  font-size: 24px;
  letter-spacing: 8px;
  font-weight: 600;
}

/* Buttons */
.reg-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.reg-btn-primary {
  background: #166534;
  color: white;
  margin-bottom: 12px;
}

.reg-btn-primary:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.3);
}

.reg-btn-primary:active {
  transform: translateY(0);
}

.reg-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.reg-btn-secondary:hover {
  background: #e5e7eb;
}

.reg-btn-link {
  background: none;
  border: none;
  color: #166534;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  width: auto;
  text-decoration: underline;
}

.reg-btn-link:hover {
  color: #15803d;
}

/* OTP Timer */
.reg-otp-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  font-size: 14px;
  color: #6b7280;
}

.reg-otp-timer strong {
  color: #166534;
}

/* Error Messages */
.reg-error-message {
  background: #fef2f2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid #dc2626;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
  position: relative;
  z-index: 200;
}


/* Disabled button styles */
.reg-btn:disabled {
  background-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.reg-btn:disabled:hover {
  background-color: #d1d5db;
  color: #9ca3af;
}

.reg-error-message.show {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Language Multi-Select */
.reg-language-multiselect {
  position: relative;
}

.reg-language-selected {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.reg-language-selected:hover {
  border-color: #166534;
}

.reg-language-placeholder {
  color: #9ca3af;
  font-size: 15px;
}

.reg-selected-lang-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #f0fdf4;
  border: 1px solid #166534;
  border-radius: 6px;
  font-size: 13px;
  color: #166534;
  font-weight: 500;
}

.reg-remove-lang {
  cursor: pointer;
  margin-left: 4px;
  font-size: 16px;
  font-weight: bold;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.reg-remove-lang:hover {
  opacity: 1;
}

.reg-language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow: hidden;
  z-index: 100;
}

.reg-language-dropdown.hidden {
  display: none;
}

.reg-language-search-wrapper {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.reg-language-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.reg-language-search:focus {
  outline: none;
  border-color: #166534;
}

.reg-language-options {
  max-height: 240px;
  overflow-y: auto;
}

.reg-language-option {
  border-bottom: 1px solid #f3f4f6;
}

.reg-language-option:last-child {
  border-bottom: none;
}

.reg-language-option-label {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  gap: 12px;
}

.reg-language-option-label:hover {
  background: #f9fafb;
}

.reg-language-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #166534;
}

.reg-language-flag {
  font-size: 18px;
}

.reg-language-name {
  flex: 1;
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

.reg-language-native {
  font-size: 13px;
  color: #6b7280;
}

/* Checkbox and Terms */
.reg-terms-container {
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.reg-checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  gap: 12px;
  font-size: 14px;
  color: #374151;
}

.reg-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-top: 2px;
  accent-color: #166534;
  flex-shrink: 0;
}

.reg-terms-link {
  color: #166534;
  font-weight: 600;
  text-decoration: underline;
}

.reg-terms-link:hover {
  color: #15803d;
}

/* Terms Modal */
.reg-terms-modal-container {
  max-width: 700px;
}

.reg-terms-content {
  max-height: 500px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.reg-terms-content h3 {
  margin: 24px 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.reg-terms-content h3:first-child {
  margin-top: 0;
}

.reg-terms-content p {
  margin: 0 0 16px 0;
}

.reg-terms-content ul {
  margin: 12px 0;
  padding-left: 24px;
}

.reg-terms-content li {
  margin-bottom: 8px;
}

/* Success Screen */
.reg-success-container {
  text-align: center;
  padding: 40px 20px;
}

.reg-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: #f0fdf4;
  color: #166534;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: bold;
}

.reg-success-title {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.reg-success-message {
  margin: 0 0 32px 0;
  font-size: 16px;
  color: #6b7280;
}

/* Country Selector Styles */
.reg-country-selector {
  position: relative;
}

.reg-country-selected {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
}

.reg-country-selected:hover {
  border-color: #166534;
}

.reg-country-flag {
  font-size: 18px;
}

.reg-country-name {
  flex: 1;
  font-size: 15px;
  color: #111827;
}

.reg-country-dial {
  font-size: 15px;
  color: #6b7280;
  font-weight: 500;
}

.reg-country-arrow {
  font-size: 12px;
  color: #9ca3af;
  transition: transform 0.2s ease;
}

.reg-country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow: hidden;
  z-index: 100;
}

.reg-country-dropdown.hidden {
  display: none;
}

.reg-country-search-wrapper {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.reg-country-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.reg-country-search:focus {
  outline: none;
  border-color: #166534;
}

.reg-country-options {
  max-height: 240px;
  overflow-y: auto;
}

.reg-country-option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  gap: 8px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
  color: #374151;
}

.reg-country-option:hover,
.reg-country-option.focused {
  background-color: #f9fafb;
}

.reg-country-option.focused {
  background-color: #f0fdf4;
  color: #166534;
}

/* Utility */
.hidden {
  display: none;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .reg-modal-container {
    width: 95%;
    max-height: 95vh;
  }

  .reg-modal-header {
    padding: 20px 24px;
  }

  .reg-modal-title {
    font-size: 20px;
  }

  .reg-modal-body {
    padding: 24px;
  }

  .reg-step-indicator {
    margin-bottom: 24px;
  }

  .reg-step-number {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .reg-step-label {
    font-size: 11px;
  }

  .reg-step-title {
    font-size: 18px;
  }

  .reg-step-description {
    font-size: 13px;
  }

  .reg-form-input,
  .reg-form-select {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  #phone-display {
    word-break: break-all;
  }
}

@media (max-width: 480px) {
  .reg-modal-header {
    padding: 16px 20px;
  }

  .reg-modal-body {
    padding: 20px;
  }

  .reg-step-number {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .reg-step-label {
    font-size: 10px;
  }

  .reg-step-line {
    margin: 0 4px;
    margin-top: 16px;
  }
}

/* Translation Limit Container Styles */
.translation-limit-container {
  order: -1; /* Move above the "Your Preferred Languages" heading */
  margin-bottom: 8px;
  padding: 6px 12px;
  background-color: #f3f4f6;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
}

.translation-limit-message {
  font-size: 12px;
  color: #374151;
  font-weight: 500;
  line-height: 1.4;
}
