/**
 * Tutor phone verification — self-contained UI (same on mobile & desktop).
 * Loaded last so it is not overridden by input.css / phone-field globals.
 */

html:has(.page-tutor-phone-verify) {
  background-color: #f5f5f5;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.page-tutor-phone-verify {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
}

/* Main sits below fixed header; fill remaining viewport and center content */
.page-tutor-phone-verify .tpv-main {
  --tpv-header-offset: var(--header-height, 3rem);
  width: 100%;
  max-width: 100%;
  margin-top: var(--tpv-header-offset);
  height: calc(100vh - var(--tpv-header-offset));
  height: calc(100dvh - var(--tpv-header-offset));
  max-height: calc(100vh - var(--tpv-header-offset));
  max-height: calc(100dvh - var(--tpv-header-offset));
  box-sizing: border-box;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

@media screen and (min-width: 768px) {
  .page-tutor-phone-verify .tpv-main {
    --tpv-header-offset: calc(var(--header-height, 3rem) + 1.5rem);
  }
}

/* Same max width as a comfortable phone column — centered on large screens */
.tpv-wrap {
  width: 100%;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.tpv-page-title {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #222;
  text-align: center;
  line-height: 1.3;
}

.tpv-page-lead {
  margin: 0 0 1.25rem;
  font-size: 14px;
  color: #444;
  line-height: 1.55;
  text-align: center;
}

.tpv-card {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 18px 18px;
  border: 1px solid #ececec;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.tpv-card-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
}

.tpv-card-hint {
  margin: 0 0 16px;
  font-size: 12px;
  color: #666;
  line-height: 1.55;
}

.tpv-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.tpv-row + .tpv-row {
  margin-top: 10px;
}

.tpv-row--phone-only .tpv-phone-wrap--full {
  flex: none;
  width: 100%;
}

.tpv-phone-wrap {
  display: flex;
  flex: 1 1 200px;
  min-width: 0;
  align-items: stretch;
}

.tpv-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 12px;
  height: 44px;
  box-sizing: border-box;
  background: #f2f2f2;
  border: 0.5px solid #999;
  border-right: none;
  border-radius: 16px 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: #000;
}

.tpv-input {
  height: 44px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 0.5px solid #999;
  background: #fbfbfb;
  font-size: 14px;
  font-family: inherit;
  color: #222;
  width: 100%;
  min-width: 0;
}

.tpv-input::placeholder {
  color: #888;
  font-size: 13px;
}

.tpv-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.tpv-input--tel {
  flex: 1 1 auto;
  border-left: none;
  border-radius: 0 16px 16px 0;
}

.tpv-otp-wrap {
  flex: 1 1 160px;
  min-width: 0;
}

.tpv-otp-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  box-sizing: border-box;
}

.tpv-input--otp {
  width: 100%;
  border-radius: 16px;
}

.tpv-input--otp-block {
  width: 100%;
}

.tpv-btn {
  flex-shrink: 0;
  height: 44px;
  padding: 0 16px;
  box-sizing: border-box;
  border: none;
  border-radius: 16px;
  background: #e8e8e8;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}

.tpv-btn--block {
  width: 100%;
}

.tpv-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.tpv-btn:hover,
.tpv-btn:focus {
  background: #d8d8d8;
  color: #222;
}

.tpv-btn:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.2);
  outline-offset: 2px;
}

.tpv-status {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  min-height: 1.2em;
}

.tpv-status--info {
  color: #444;
}

.tpv-status--error {
  color: #b42318;
  font-weight: 500;
}

.tpv-status--success {
  color: #067647;
}

.tpv-recaptcha {
  margin-top: 12px;
  width: 100%;
}

.tpv-footnote {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}
