/* Register Page Specialized Styles */

/* CSS Variables - Light Mode */
:root {
  --background: #ffffff;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-background: #ffffff;
  --card-foreground: #0f172a;
  --popover: #ffffff;
  --popover-foreground: #0f172a;
  --primary: #3b82f6;
  --primary-foreground: #ffffff;
  --secondary: #f1f5f9;
  --secondary-foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --accent-foreground: #0f172a;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #3b82f6;
  --radius: 0.5rem;
}

/* Dark Mode Variables */
/* @media (prefers-color-scheme: dark) {
  :root {
    --background: #0f172a;
    --foreground: #f8fafc;
    --card: #1e293b;
    --card-background: #1e293b;
    --card-foreground: #f8fafc;
    --popover: #1e293b;
    --popover-foreground: #f8fafc;
    --primary: #60a5fa;
    --primary-foreground: #0f172a;
    --secondary: #334155;
    --secondary-foreground: #f8fafc;
    --muted: #334155;
    --muted-foreground: #94a3b8;
    --accent: #334155;
    --accent-foreground: #f8fafc;
    --destructive: #f87171;
    --destructive-foreground: #0f172a;
    --border: #334155;
    --input: #334155;
    --ring: #60a5fa;
  }

  .card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
} */

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Dashboard Layout */
.dashboard-layout {
  min-height: 100vh;
  background-color: var(--background);
  display: flex;
}

.main-content {
  padding: 2rem;
  background-color: var(--background);
}

/* Card Styles */
.card-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.card {
  width: 100%;
  max-width: 500px;
  background-color: var(--card-background);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
  background-color: var(--card-background);
}

.card-header h2 {
  margin: 0;
  color: var(--card-foreground);
  font-size: 1.5rem;
  font-weight: 600;
}

.card-content {
  padding: 1.5rem;
  background-color: var(--card-background);
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  background-color: var(--card-background);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* @media (prefers-color-scheme: dark) {
  .form-group input:focus,
  .form-group select:focus {
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
  }
} */

.form-group small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

/* Password Input Container */
.password-input-container {
  position: relative;
}

.eye-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  color: var(--muted-foreground);
  padding: 5px;
  transition: color 0.2s ease;
}

.eye-button:hover {
  color: var(--foreground);
}

/* Button Styles */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-height: 44px;
}

.button.primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.button.primary:hover:not(:disabled) {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.button.secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.button.secondary:hover:not(:disabled) {
  background-color: var(--accent);
  transform: translateY(-1px);
}

.button.destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}

.button.destructive:hover:not(:disabled) {
  background-color: #dc2626;
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.button.success {
  background-color: #28a745;
  color: white;
  border: none;
}

/* Switch Styles (Business Toggle) */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Business Verification Section */
.verification-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.verification-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.verification-question {
  text-align: center;
  margin-top: 15px;
}



/* Loading Spinner */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* @media (prefers-color-scheme: dark) {
  .loading {
    background-color: rgba(15, 23, 42, 0.8);
  }
} */

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* @media (prefers-color-scheme: dark) {
  .spinner {
    border: 4px solid rgba(148, 163, 184, 0.3);
    border-top: 4px solid var(--primary);
  }
} */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  padding: 1rem;
  position: relative;
  overflow-y: auto;
  max-height: 70vh;
}

.modal-container {
  position: relative;
  background-color: var(--background);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 90vw;
  max-height: 90vh;
  z-index: 101;
}

.modal-container.large {
  max-width: 700px;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--background);
}

.modal-header h3 {
  margin: 0;
  color: var(--foreground);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted-foreground);
  padding: 0.25rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background-color: var(--accent);
  color: var(--foreground);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  background-color: var(--background);
  flex-shrink: 0;
}

.modal-footer .button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.modal-footer .button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-footer .button.modal-cancel {
  background: #dc3545;
  color: var(--text-secondary, #6b7280);
  border-color: var(--border, #d1d5db);
}

.modal-footer .button.modal-cancel:hover:not(:disabled) {
  background: #b91c1c;
  border-color: var(--border-hover, #9ca3af);
}

.modal-footer .button.primary {
  background: var(--primary, #3b82f6);
  color: white;
}

.modal-footer .button.primary:hover:not(:disabled) {
  background: var(--primary-dark, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.scroll-to-bottom {
  position: absolute;
  right: 40px;
  top: 16px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.terms-section {
  margin-bottom: 2rem;
}

.terms-section h3 {
  color: var(--foreground);
  margin-bottom: 1rem;
  font-weight: 600;
}

.terms-section p,
.terms-section li {
  color: var(--muted-foreground);
  line-height: 1.6;
}

.terms-section ul {
  padding-left: 1.5rem;
}

.terms-section a {
  color: var(--primary);
  text-decoration: underline;
}

/* Footer Link */
.footer-link {
  text-decoration: none;
  color: var(--primary);
  transition: text-decoration 0.2s;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Responsive Design - Mobile First */
@media (max-width: 1023px) {
  .main-content {
    padding: 1rem;
  }

  .card-container {
    margin-top: 1rem;
  }

  .card {
    max-width: 100%;
    margin: 0 auto;
  }

  .card-header,
  .card-content,
  .card-footer {
    padding: 1rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.625rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .button {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    min-height: 48px; /* Better touch target */
  }

  .modal-container {
    max-width: 95vw;
    margin: 1rem;
  }

  .modal-header,
  .modal-content,
  .modal-footer {
    padding: 1rem;
  }

  .modal-content {
    max-height: 70vh;
  }

  .verification-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
}


/* Focus styles for accessibility */
.button:focus-visible,
.form-group input:focus-visible,
.form-group select:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid #09f;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Business fields toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Business verification section */
.verification-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.verification-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.button.success {
  background-color: #28a745;
  color: white;
  border: none;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.password-input-container {
  position: relative;
}

.eye-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  color: var(--muted-foreground);
}

.footer-link {
  text-decoration: none;
  color: var(--primary);
  transition: text-decoration 0.2s;
}

.footer-link:hover {
  text-decoration: underline;
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid #09f;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Business fields toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Business verification section */
.verification-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.verification-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}



/* Merketing and Terms Checkboxes */

.marketing-checkbox, .terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}


.marketing-checkbox input[type="checkbox"], .terms-checkbox input[type="checkbox"] {
  display: none;
}

.marketing-checkbox label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--foreground);
}

.terms-checkbox label {
  display: inline-flex;     
  flex-wrap: wrap;           
  line-height: 1.4;          
}


.marketing-checkbox .custom-checkbox, .terms-checkbox .custom-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #ccc;
  border-radius: 6px;
  background-color: white;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background-color 0.3s;
  position: relative;
}

.marketing-checkbox .custom-checkbox::after, .terms-checkbox .custom-checkbox::after {
  content: "✔";
  color: blue;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.marketing-checkbox input[type="checkbox"]:checked + label .custom-checkbox, .terms-checkbox input[type="checkbox"]:checked + label .custom-checkbox {
  background-color: white; 
  border-color: #4f46e5; 
}

.marketing-checkbox input[type="checkbox"]:checked + label .custom-checkbox::after, .terms-checkbox input[type="checkbox"]:checked + label .custom-checkbox::after {
  opacity: 1;
}


@media (max-width: 600px) {
  .marketing-checkbox, .terms-checkbox {
    flex-direction: column;     /* checkboxul și textul pe două rânduri */
    align-items: flex-start;
    gap: 6px;                   /* mai mic decât pe desktop */
  }

  .marketing-checkbox label, .terms-checkbox label {
    font-size: 14px;            /* text mai mic pe mobil */
    line-height: 1.5;
  }

  .marketing-checkbox .custom-checkbox,
  .terms-checkbox .custom-checkbox {
    width: 18px;                /* puțin mai mic pe mobil */
    height: 18px;
    min-width: 18px;
    margin-right: 8px;
  }

  .terms-checkbox label {
    display: flex;
    flex-direction: row;        /* textul rămâne pe lângă checkbox */
    flex-wrap: wrap;
    font-size: 14px;
  }

  .terms-checkbox a {
    display: inline-block;
    margin-top: 2px;            /* mic spațiu dacă se rupe pe două rânduri */
  }

  #terms-status {
    font-size: 14px;
  }
}