/* ===========================
   REGISTRATION FORM STYLES
   =========================== */

body.registration-page {
  font-family: var(--font-base, sans-serif);
  background: linear-gradient(135deg, #14410b 0%, #73af7e 100%);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

/* ===========================
   TAB NAVIGATION STYLES
   =========================== */

.register-form {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin: 2rem 0;
}

.register-form h1 {
  text-align: center;
  color: var(--nl-green-dark, #14410b);
  margin: 2rem 0 1rem 0;
  font-size: 2rem;
}

.register-form > p {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
}

.tab-navigation {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 0;
}

.tab-headers {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  gap: 2rem;
}

/* Fallback for browsers without flexbox support */
.no-flexbox .tab-headers {
  display: block;
  text-align: center;
}

.no-flexbox .tab-header {
  display: inline-block;
  margin: 0 1rem;
  vertical-align: top;
}

.tab-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  min-width: 160px;
}

.tab-header:hover {
  background: rgba(115, 175, 126, 0.1);
}

.tab-header.active {
  background: var(--nl-green-dark, #14410b);
  color: white;
}

.tab-header.active .tab-number {
  background: var(--nl-green-dark, #14410b);
}

.tab-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ddd;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.tab-title {
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  color: var(--nl-green-dark, #14410b);
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.tab-progress {
  height: 4px;
  background: #e9ecef;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: var(--nl-green-dark, #14410b);
  width: 50%;
  -webkit-transition: width 0.3s ease;
  -moz-transition: width 0.3s ease;
  -o-transition: width 0.3s ease;
  transition: width 0.3s ease;
}

/* ===========================
   TAB CONTENT STYLES
   =========================== */

.tab-content {
  display: none;
  padding: 2rem;
  -webkit-animation: fadeIn 0.3s ease;
  -moz-animation: fadeIn 0.3s ease;
  -o-animation: fadeIn 0.3s ease;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

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

/* ===========================
   FORM SECTION STYLES
   =========================== */

.form-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--nl-green-dark, #14410b);
}

.form-section h2 {
  color: var(--nl-green-dark, #14410b);
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  text-align: left;
}

.form-section h3 {
  color: var(--nl-green-dark, #14410b);
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0.5rem;
}

/* ===========================
   FORM FIELD STYLES
   =========================== */

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--nl-green-dark, #14410b) !important;
  font-size: 0.95rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  -webkit-transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -moz-transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -o-transition: border-color 0.3s ease, box-shadow 0.3s ease;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white;
  color: #333;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--nl-green-dark, #14410b);
  box-shadow: 0 0 0 3px rgba(115, 175, 126, 0.2);
}

.form-field input:invalid {
  border-color: #dc3545;
}

.form-field input:valid {
  border-color: #28a745;
}

/* ==========================================
   FORM ROW LAYOUTS
   =========================== */
/* Two-column layout for name fields */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Fallback for browsers without grid support */
.no-grid .form-row {
  display: block;
}

.no-grid .form-row .form-field {
  display: inline-block;
  width: calc(50% - 0.5rem);
  margin-right: 1rem;
  vertical-align: top;
}

/* Three-column layout for address fields */
.form-row.address-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.no-grid .form-row.address-row .form-field {
  width: calc(33.33% - 0.67rem);
}

/* Equal three-column layout */
.form-row-triple-equal {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.no-grid .form-row-triple-equal {
  display: block;
}

.no-grid .form-row-triple-equal .form-field {
  display: inline-block;
  width: calc(33.33% - 0.67rem);
  margin-right: 1rem;
  vertical-align: top;
}

/* ===========================
   PHONE INPUT STYLES
   =========================== */

.phone-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 350px;
}

.state-compact,
.country-code-compact {
  width: auto;
  min-width: 70px;
  max-width: 90px;
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  background: white;
  color: #333;
  flex: 0 0 auto;
}

.phone-number-compact {
  flex: 1 1 0;
  min-width: 120px;
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  background: white;
  color: #333;
}

/* ===========================
   ADDRESS SECTION STYLES
   =========================== */

.address-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--nl-green-light, #73af7e);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--nl-green-dark, #14410b) !important;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  -webkit-transform: scale(1.2);
  -moz-transform: scale(1.2);
  -ms-transform: scale(1.2);
  -o-transform: scale(1.2);
  transform: scale(1.2);
}

/* ===========================
   FORM NAVIGATION STYLES
   =========================== */

.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid #e9ecef;
}

/* Fallback for browsers without flexbox support */
.no-flexbox .form-navigation {
  display: block;
  text-align: center;
}

.no-flexbox .form-navigation .btn {
  display: inline-block;
  margin: 0.5rem;
}

.form-navigation .btn {
  padding: 12px 24px;
  border: 2px solid var(--nl-green-dark, #14410b);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  min-width: 120px;
  text-align: center;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border-color: #6c757d;
}

.btn-secondary:hover:not(:disabled) {
  background: #5a6268;
  border-color: #5a6268;
}

.btn-secondary:disabled {
  background: #ccc;
  border-color: #ccc;
  color: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-primary {
  background: var(--nl-green-dark, #14410b);
  color: white;
  border-color: var(--nl-green-dark, #14410b);
}

.btn-primary:hover:not(:disabled) {
  background: var(--nl-green-light, #73af7e);
  border-color: var(--nl-green-light, #73af7e);
}

.btn-primary:disabled {
  background: #ccc;
  border-color: #ccc;
  color: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

.submit {
  display: none;
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid #e9ecef;
}

.submit.visible {
  display: block;
}

.btn-success {
  background: #28a745;
  color: white;
  border-color: #28a745;
  padding: 14px 32px;
  font-size: 1.1rem;
  min-width: 200px;
}

.btn-success:hover {
  background: #218838;
  border-color: #218838;
}

/* ===========================
   FORM FOOTER STYLES
   =========================== */

.form-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.form-footer p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.form-footer a {
  color: var(--nl-green-dark, #14410b);
  text-decoration: none;
  font-weight: 600;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* ===========================
   RESPONSIVE STYLES
   =========================== */

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .tab-headers {
    flex-direction: column;
    gap: 1rem;
  }

  .tab-header {
    min-width: 200px;
  }

  .tab-content {
    padding: 1rem;
  }

  .form-section {
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .form-row.address-row {
    grid-template-columns: 1fr;
  }

  .form-row-triple-equal {
    grid-template-columns: 1fr;
  }

  .phone-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    max-width: 100%;
  }

  .country-code-compact,
  .phone-number-compact {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .form-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .form-navigation .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .register-form h1 {
    font-size: 1.5rem;
  }

  .tab-number {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .tab-title {
    font-size: 0.9rem;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    padding: 10px;
    font-size: 0.95rem;
  }
}

/* ===========================
   UTILITY CLASSES
   =========================== */

.checkmark {
  display: none;
  color: #28a745;
  font-size: 1.2em;
  margin-left: 0.5rem;
}

.error-message {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
}

.required::after {
  content: "*";
  color: #dc3545;
  margin-left: 0.25rem;
}

/* ===========================
   DARK MODE SUPPORT
   =========================== */

@media (prefers-color-scheme: dark) {
  .register-form {
    background: #1a1a1a;
    color: #e9ecef;
  }

  .form-section {
    background: #2d2d2d;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    background: #333;
    color: #e9ecef;
    border-color: #555;
  }

  .form-field input:focus,
  .form-field select:focus,
  .form-field textarea:focus {
    background: #444;
    border-color: var(--nl-green-light, #73af7e);
  }
}
