/* PARINHALL SMS — sign-in card.

   Written to look right on any theme and to be easy to override. Every
   value is a custom property with a fallback, so a theme restyles the
   card by declaring the variables rather than fighting these rules:

       .phs-card { --phs-accent: #1B7A8C; --phs-radius: 8px; }

   Selectors are single-class and shallow on purpose — a theme rule of
   equal specificity that comes later wins, which is what an override
   should need to be. */

.phs-card {
  --phs-accent: #E2734A;
  --phs-accent-dark: #C85A34;
  --phs-text: #0E382F;
  --phs-body: #5C5650;
  --phs-muted: #9C9382;
  --phs-surface: #fff;
  --phs-radius: 12px;
  --phs-gap: 16px;

  max-width: 420px;
  margin-inline: auto;
  padding: 28px;
  background: var(--phs-surface);
  border-radius: calc(var(--phs-radius) + 6px);
  box-shadow: 0 4px 24px rgba(14, 56, 47, .08);
  color: var(--phs-body);
  font-size: 15px;
  line-height: 1.8;
  box-sizing: border-box;
}

.phs-card *,
.phs-card *::before,
.phs-card *::after { box-sizing: inherit; }

.phs-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--phs-text);
}

.phs-lead {
  margin: 0 0 var(--phs-gap);
  font-size: 14px;
}

.phs-field { margin: 0 0 var(--phs-gap); }

.phs-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--phs-text);
}

.phs-field input {
  width: 100%;
  min-height: 48px;
  padding: 8px 14px;
  border: 1.5px solid var(--phs-muted);
  border-radius: var(--phs-radius);
  background: var(--phs-surface);
  font: inherit;
  color: var(--phs-text);
}

.phs-field input:focus,
.phs-digit:focus {
  outline: none;
  border-color: var(--phs-accent);
  box-shadow: 0 0 0 3px rgba(226, 115, 74, .18);
}

.phs-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: var(--phs-gap);
  font-size: 13px;
  cursor: pointer;
}

.phs-consent input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--phs-accent);
}

.phs-consent a { color: var(--phs-accent-dark); }

/* One row, never wrapping. A wrapped code field reads as two fields and
   people fill in the wrong half. */
.phs-digits {
  display: grid;
  grid-template-columns: repeat(var(--phs-count, 6), 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.phs-card[data-length="4"] .phs-digits { --phs-count: 4; }
.phs-card[data-length="5"] .phs-digits { --phs-count: 5; }
.phs-card[data-length="6"] .phs-digits { --phs-count: 6; }
.phs-card[data-length="7"] .phs-digits { --phs-count: 7; }
.phs-card[data-length="8"] .phs-digits { --phs-count: 8; }

.phs-digit {
  width: 100%;
  min-height: 52px;
  padding: 0;
  text-align: center;
  font: 700 20px/1 inherit;
  font-family: inherit;
  color: var(--phs-text);
  background: var(--phs-surface);
  border: 1.5px solid var(--phs-muted);
  border-radius: var(--phs-radius);
}

.phs-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
  margin: 0 0 var(--phs-gap);
}

.phs-timer {
  font-size: 13px;
  font-weight: 600;
  color: var(--phs-muted);
  direction: ltr;
}

.phs-btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--phs-accent);
  color: #fff;
  font: 700 16px/1 inherit;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s ease;
}

.phs-btn:hover:not(:disabled) { background: var(--phs-accent-dark); }
.phs-btn:disabled { opacity: .6; cursor: default; }

.phs-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--phs-accent-dark);
  font: 600 13px/1.8 inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phs-block {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
}

.phs-notice:empty { display: none; }

.phs-notice {
  margin-bottom: var(--phs-gap);
  padding: 12px 14px;
  border-radius: var(--phs-radius);
  font-size: 13.5px;
  line-height: 1.8;
}

.phs-notice--success { background: #E3F2EE; color: #217750; }
.phs-notice--error { background: #FBEAEA; color: #C13636; }
.phs-notice--info { background: #DCEEF1; color: #1B7A8C; }

@media (max-width: 480px) {
  .phs-card { padding: 20px; }
  .phs-digits { gap: 6px; }
  .phs-digit { min-height: 46px; font-size: 18px; }
}
