/* ===========================
   SIGNUP PAGE STYLES
=========================== */

:root {
  --mint: #a8e6cf;
  --dark-green: #476d5f;
  --dark-grey: #666d6b;
  --light-grey: #ececec;
  --bg: #fcfdfc;
  --white: #ffffff;
  --font-main: "Codec Pro", "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Override body for signup pages */
body.signup-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===========================
   SIGNUP CONTAINER
=========================== */
.signup-container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===========================
   SIGNUP CARD
=========================== */
.signup-card {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--light-grey);
}

.signup-card h1 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--dark-green);
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.2;
}

.signup-subtitle {
  color: var(--dark-grey);
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 32px;
}

/* ===========================
   FORM ELEMENTS
=========================== */
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-field {
  width: 100%;
}

.form-field input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: var(--font-main);
  border: 1px solid var(--light-grey);
  border-radius: 8px;
  background: var(--white);
  color: var(--dark-grey);
  transition: all 0.2s ease;
}

.form-field input:focus {
  outline: none;
  border-color: var(--dark-green);
  box-shadow: 0 0 0 3px rgba(168, 230, 207, 0.2);
}

.form-field input::placeholder {
  color: var(--dark-grey);
  opacity: 0.5;
}

.form-field input.error {
  border-color: #dc2626;
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 4px;
  font-weight: 500;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font-main);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Primary button */
.btn-primary {
  background-color: var(--mint);
  color: var(--dark-green);
  border: 1px solid var(--dark-green);
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(0.97);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

/* Social buttons */
.btn-social {
  background: var(--white);
  color: var(--dark-grey);
  border: 1px solid var(--light-grey);
  font-weight: 500;
}

.btn-social:hover {
  background: var(--bg);
  border-color: var(--dark-grey);
}

.btn-social svg {
  flex-shrink: 0;
}

.btn-google svg {
  width: 20px;
  height: 20px;
}

.btn-apple svg,
.btn-facebook svg {
  width: 20px;
  height: 20px;
}

/* Text button */
.btn-text {
  background: transparent;
  color: var(--dark-green);
  padding: 10px 16px;
  border: 1px solid transparent;
  font-weight: 500;
}

.btn-text:hover {
  background: var(--mint);
  border-color: var(--dark-green);
}

/* ===========================
   DIVIDER
=========================== */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
  color: var(--dark-grey);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light-grey);
}

/* ===========================
   FOOTER LINKS
=========================== */
.signup-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--dark-grey);
  font-size: 0.9rem;
}

.signup-footer a {
  color: var(--dark-green);
  text-decoration: none;
  font-weight: 600;
}

.signup-footer a:hover {
  text-decoration: underline;
}

/* ===========================
   COUNTRY SELECTOR
=========================== */
.country-selector {
  position: relative;
  text-align: center;
  margin-top: 32px;
}

.country-button {
  background: var(--white);
  border: 1px solid var(--light-grey);
  color: var(--dark-grey);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.country-button:hover {
  background: var(--bg);
  border-color: var(--dark-grey);
}

.country-button svg {
  transition: transform 0.2s ease;
}

.country-button.active svg {
  transform: rotate(180deg);
}

.country-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.country-dropdown.active {
  opacity: 1;
  visibility: visible;
}

.country-option {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--dark-grey);
  transition: background 0.15s ease;
}

.country-option:hover {
  background: var(--mint);
}

.country-option:active {
  background: var(--dark-green);
  color: var(--white);
}

/* ===========================
   MODAL
=========================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 32px 32px 24px;
  text-align: center;
  position: relative;
}

.modal-logo {
  height: 48px;
  margin-bottom: 16px;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark-green);
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--dark-grey);
  opacity: 0.6;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: var(--dark-green);
  opacity: 1;
}

.modal-body {
  padding: 0 32px 24px;
  text-align: center;
}

.modal-body p {
  color: var(--dark-grey);
  line-height: 1.6;
  margin-bottom: 24px;
}

.app-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.app-badge {
  display: inline-block;
  transition: transform 0.2s ease;
}

.app-badge:hover {
  transform: scale(1.05);
}

.app-badge img {
  display: block;
  height: 44px;
  width: auto;
}

.modal-footer {
  padding: 16px 32px 32px;
  text-align: center;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 600px) {
  .signup-container {
    padding: 30px 16px;
  }

  .signup-card {
    padding: 32px 24px;
  }

  .signup-card h1 {
    font-size: 1.75rem;
  }

  .signup-logo img {
    height: 40px;
  }

  .modal-content {
    max-width: 100%;
  }

  .modal-header,
  .modal-body {
    padding-left: 24px;
    padding-right: 24px;
  }

  .modal-footer {
    padding: 16px 24px 24px;
  }
}

@media (max-width: 400px) {
  .signup-card {
    padding: 24px 20px;
  }

  .btn {
    font-size: 0.95rem;
    padding: 12px 16px;
  }
}

/* ===========================
   SIGNUP DETAILS PAGE
=========================== */

/* Progress indicator */
.signup-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  gap: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--light-grey);
  color: var(--dark-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.progress-step.completed .step-number {
  background: var(--dark-green);
  color: var(--white);
}

.progress-step.active .step-number {
  background: var(--mint);
  color: var(--dark-green);
  border: 2px solid var(--dark-green);
}

.step-label {
  font-size: 0.75rem;
  color: var(--dark-grey);
  font-weight: 500;
  opacity: 0.6;
}

.progress-step.completed .step-label,
.progress-step.active .step-label {
  color: var(--dark-grey);
  opacity: 1;
}

.progress-line {
  width: 60px;
  height: 2px;
  background: var(--light-grey);
  margin: 0 -4px;
  margin-bottom: 24px;
}

/* Form labels */
.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark-grey);
  margin-bottom: 6px;
}

.optional-label {
  color: var(--dark-grey);
  opacity: 0.6;
  font-weight: 400;
  font-size: 0.85rem;
}

/* Field hint */
.field-hint {
  font-size: 0.85rem;
  color: var(--dark-grey);
  opacity: 0.7;
  margin-top: 4px;
}

/* Read-only input */
.input-readonly {
  background: var(--bg) !important;
  color: var(--dark-grey);
  cursor: not-allowed;
}

.form-field {
  position: relative;
}

.field-edit-link {
  position: absolute;
  right: 12px;
  top: 35px;
  font-size: 0.85rem;
  color: var(--dark-green);
  text-decoration: none;
  font-weight: 600;
}

.field-edit-link:hover {
  text-decoration: underline;
}

/* Password toggle */
.input-with-toggle {
  position: relative;
}

.input-with-toggle input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--dark-grey);
  opacity: 0.6;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: var(--dark-green);
  opacity: 1;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* Checkboxes */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--dark-green);
}

.form-checkbox label {
  font-size: 0.9rem;
  color: var(--dark-grey);
  line-height: 1.5;
  cursor: pointer;
}

.form-checkbox label a {
  color: var(--dark-green);
  text-decoration: none;
  font-weight: 600;
}

.form-checkbox label a:hover {
  text-decoration: underline;
}

/* Trial info box */
.trial-info {
  background: var(--mint);
  border: 1px solid var(--dark-green);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.trial-info svg {
  flex-shrink: 0;
  color: var(--dark-green);
  margin-top: 2px;
}

.trial-info p {
  font-size: 0.85rem;
  color: var(--dark-green);
  line-height: 1.6;
  margin: 0;
}

/* Button block */
.btn-block {
  width: 100%;
  margin-top: 8px;
}

/* Responsive adjustments for progress */
@media (max-width: 600px) {
  .progress-line {
    width: 40px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .step-label {
    font-size: 0.7rem;
  }
}

@media (max-width: 400px) {
  .signup-progress {
    gap: 0;
  }

  .progress-line {
    width: 30px;
  }

  .step-label {
    display: none;
  }
}
