/* ===================================
   FORMS
   =================================== */

.form-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 52px 56px 56px;
}

.natal-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 28px;
}

.form-grid>label {
  grid-column: span 1;
}

.form-grid>label.full {
  grid-column: 1 / -1;
}

.natal-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--gold);
  font-weight: 400;
}

.natal-form input[type="text"],
.natal-form input[type="email"],
.natal-form select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--line-dim);
  border-radius: 4px;
  color: var(--text-primary) !important;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.natal-form input:-webkit-autofill,
.natal-form input:-webkit-autofill:hover, 
.natal-form input:-webkit-autofill:focus, 
.natal-form input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 40px var(--bg-input) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
  font-family: 'Manrope', sans-serif !important;
}

.natal-form input::placeholder {
  color: var(--text-muted);
  font-family: 'Manrope', sans-serif;
  font-style: normal;
}

.natal-form input:focus,
.natal-form select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.natal-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d4af37' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.natal-form select option {
  background: var(--bg-deep);
  color: var(--text-primary);
}

.date-row,
.time-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.date-row input {
  width: 70px;
  text-align: center;
}

.date-row input.year {
  width: 90px;
}

.date-row span,
.time-row span {
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-style: normal;
}

.time-row input {
  width: 70px;
  text-align: center;
}

.date-row--wide {
  gap: 14px;
  flex-wrap: nowrap;
}

.date-row--wide input {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}

.date-row--wide span {
  flex: 0 0 auto;
}

.time-row--wide {
  gap: 14px;
  flex-wrap: nowrap;
}

.time-row--wide input {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  text-align: center;
}

.time-row--wide>span:not(.ampm-toggle) {
  flex: 0 0 auto;
}

.time-row--wide .ampm-toggle {
  flex: 0 0 auto;
  margin-left: 0;
}

@media (max-width: 560px) {

  .date-row--wide,
  .time-row--wide {
    flex-wrap: wrap;
  }

  .time-row--wide .ampm-toggle {
    margin-left: auto;
  }
}

.ampm-toggle {
  display: inline-flex;
  margin-left: 14px;
  border: 1px solid var(--line-dim);
  border-radius: 999px;
  overflow: hidden;
}

.ampm-toggle button {
  background: transparent;
  border: none;
  padding: 8px 18px;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.ampm-toggle button.active {
  background: var(--gold);
  color: var(--bg-deep);
}

.checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 12px !important;
  font-style: normal !important;
  font-family: 'Manrope', sans-serif !important;
  font-size: 13px !important;
  color: var(--text-secondary) !important;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  background: var(--bg-input);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s;
}

.checkbox input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}

.checkbox input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--bg-deep);
  font-size: 12px;
  font-weight: 700;
}

.form-privacy {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.5;
}

.natal-form .btn {
  align-self: center;
  margin-top: 12px;
}

@media (max-width: 700px) {
  .form-wrap {
    padding: 32px 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  #chart-form .container {
    padding: 0 8px;
  }

  .form-wrap {
    padding: 24px 12px;
  }

  .natal-form {
    gap: 16px;
  }

  .form-grid {
    gap: 16px;
  }

  .natal-form input[type="text"],
  .natal-form input[type="email"],
  .natal-form select {
    padding: 12px 14px;
  }
}

/* ===================================
   GEOLOCATION SUGGESTIONS
   =================================== */

.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--line-dim);
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 10;
  padding: 0;
  margin: 0;
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.suggestions:empty {
  display: none;
  border: none;
}

.suggestions li {
  padding: 12px 16px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid var(--line-dim);
}

.suggestions li:last-child {
  border-bottom: none;
}

.suggestions li:hover {
  background: var(--bg-input);
  color: var(--gold-bright);
}

[data-theme="light"] .suggestions {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .suggestions li:hover {
  background: var(--bg-body);
}
