@import url("./site.css");

.signup-layout {
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  gap: 1.2rem;
}

.signup-side,
.signup-card {
  padding: 1.3rem;
}

.signup-card {
  position: relative;
  overflow: visible;
}

.detail-title {
  margin: 1rem 0 0.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-copy {
  margin: 0 0 1rem;
  color: var(--muted);
}

.auth-card-head {
  margin-bottom: 1rem;
}

.social-grid {
  display: grid;
  gap: 0.9rem;
}

.social-google-slot {
  min-height: 3.25rem;
  display: grid;
  align-items: center;
}

.social-google-slot > div {
  width: 100%;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 3.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.social-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.social-button[hidden],
.social-google-slot[hidden] {
  display: none;
}

.social-mark {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
}

.google-mark {
  background: linear-gradient(135deg, #4285f4, #34a853);
}

.apple-mark {
  background: linear-gradient(135deg, #111827, #4b5563);
}

.divider {
  position: relative;
  margin: 1.3rem 0;
  text-align: center;
}

.divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid rgba(23, 32, 51, 0.1);
}

.divider span {
  position: relative;
  padding: 0 0.8rem;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.9rem;
}

.signup-form {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

.field-warning {
  font-size: 0.8rem;
  font-weight: 700;
  color: #d14343;
}

.field input,
.field select,
.phone-row input {
  min-height: 3.2rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  background: rgba(248, 250, 255, 0.9);
  outline: none;
}

.field input:focus,
.field select:focus,
.phone-row input:focus {
  border-color: rgba(90, 124, 255, 0.45);
  box-shadow: 0 0 0 5px rgba(90, 124, 255, 0.12);
}

.field input.is-invalid {
  border-color: rgba(209, 67, 67, 0.55);
  background: rgba(255, 231, 231, 0.95);
  box-shadow: 0 0 0 5px rgba(209, 67, 67, 0.12);
}

.field-full {
  grid-column: 1 / -1;
}

.country-select {
  position: relative;
  display: grid;
  align-content: start;
}

.country-trigger {
  width: 100%;
  min-height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 16px;
  background: rgba(248, 250, 255, 0.9);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.country-trigger:focus {
  outline: none;
  border-color: rgba(90, 124, 255, 0.45);
  box-shadow: 0 0 0 5px rgba(90, 124, 255, 0.12);
}

.country-trigger span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 20;
  width: 100%;
  max-width: 100%;
  max-height: 16rem;
  overflow-y: auto;
  margin-top: 0.45rem;
  padding: 0.45rem;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(23, 32, 51, 0.08);
  box-shadow: var(--shadow);
}

.country-option {
  width: 100%;
  display: block;
  padding: 0.75rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.country-option:hover,
.country-option.is-selected {
  background: rgba(90, 124, 255, 0.08);
}

.dob-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.hidden {
  display: none;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(0, 14rem) 1fr;
  gap: 0.75rem;
  align-items: start;
}

.dial-code {
  position: relative;
  display: grid;
  align-content: start;
}

.dial-trigger {
  min-width: 7.3rem;
  min-height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 16px;
  background: rgba(248, 250, 255, 0.9);
  color: var(--text);
  cursor: pointer;
}

.dial-trigger:focus {
  outline: none;
  border-color: rgba(90, 124, 255, 0.45);
  box-shadow: 0 0 0 5px rgba(90, 124, 255, 0.12);
}

.dial-trigger-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dial-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 20;
  width: 14rem;
  max-width: 100%;
  max-height: 15rem;
  overflow-y: auto;
  padding: 0.45rem;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(23, 32, 51, 0.08);
  box-shadow: var(--shadow);
}

.dial-option {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.dial-option:hover,
.dial-option.is-selected {
  background: rgba(90, 124, 255, 0.08);
}

.dial-name {
  color: var(--text);
  font-size: 0.94rem;
}

.dial-code-copy {
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-feedback {
  min-height: 1.1rem;
  margin: 0;
  font-weight: 700;
  color: #0d867a;
}

.auth-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-note a {
  color: var(--accent-2);
  font-weight: 700;
}

@media (max-width: 980px) {
  .signup-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .form-grid,
  .dob-grid,
  .phone-row {
    grid-template-columns: 1fr;
  }

  .field-full {
    grid-column: auto;
  }

  .dial-menu {
    width: 100%;
    left: 0;
  }
}
