/* Shared form/vote styles (extends public.css) */

.outer {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 53px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 32px);
}

.card {
  background: linear-gradient(180deg, rgba(16, 36, 58, 0.95), rgba(7, 20, 33, 0.98));
  border: 1px solid var(--wwm-border);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 48px);
  width: 100%;
  max-width: 700px;
  box-shadow: var(--shadow-acc);
}

.card-header { margin-bottom: 28px; }
.card-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--wwm-gold-dim);
  border: 1px solid rgba(246, 211, 101, 0.28);
  color: var(--wwm-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.card-title { font-size: clamp(22px, 4vw, 30px); font-weight: 900; letter-spacing: -.02em; }
.card-lead  { color: var(--muted); font-size: 14px; margin-top: 6px; }

.status-box {
  text-align: center;
  padding: 32px 16px;
}
.status-icon {
  font-size: 52px;
  margin-bottom: 16px;
  line-height: 1;
}
.status-box h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}
.status-box p { color: var(--muted); }

.question-text {
  font-size: clamp(18px, 3.5vw, 22px);
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.4;
}

.vote-buttons { display: grid; gap: 12px; }
.vote-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--wwm-border);
  background: rgba(7, 20, 33, 0.5);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.vote-btn:hover:not(:disabled) {
  border-color: var(--border-acc);
  background: var(--wwm-accent-dim);
  transform: translateY(-1px);
}
.vote-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.vote-letter {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--wwm-navy-deep), var(--wwm-accent));
  color: var(--wwm-text);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vote-label { flex: 1; }

.vote-now-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #a7f3c7;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.15);
}
.vote-now-banner .pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--wwm-ok);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
  animation: vote-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes vote-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: .85; }
}

.phase-hint {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 16px;
}

.flash {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
}
.flash.err {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.28);
  color: #fca5a5;
}
.flash.ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #a7f3c7;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 4px;
}
.req { color: var(--wwm-gold); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 720px) {
  .form-row,
  .form-row3 { grid-template-columns: 1fr; }
}

.landing-form { margin-top: 8px; }
label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
}
input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--wwm-border);
  background: rgba(7, 20, 33, 0.6);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .2s, background .2s;
  text-transform: uppercase;
  letter-spacing: .08em;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--wwm-accent-dim);
}
textarea,
input.input-plain,
input[type="email"] {
  text-transform: none;
  letter-spacing: normal;
}
textarea {
  width: 100%;
  min-height: 110px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--wwm-border);
  background: rgba(7, 20, 33, 0.6);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.55;
  resize: vertical;
  transition: border-color .2s, background .2s;
}
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--wwm-accent-dim);
}
textarea::placeholder,
input[type="email"]::placeholder {
  text-transform: none;
  letter-spacing: normal;
  color: var(--muted);
  opacity: 0.85;
}
.fg { margin-bottom: 16px; }

.phone-friends-accordion,
.phone-friend-panel {
  border: 1px solid var(--wwm-border);
  border-radius: 16px;
  background: rgba(7, 20, 33, 0.45);
  overflow: hidden;
}

.phone-friends-accordion {
  margin-top: 24px;
}

.phone-friends-accordion > summary,
.phone-friend-panel > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  user-select: none;
}

.phone-friends-accordion > summary::-webkit-details-marker,
.phone-friend-panel > summary::-webkit-details-marker {
  display: none;
}

.phone-friends-summary-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--wwm-gold);
}

.phone-friend-summary-text {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.phone-friend-index {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.phone-friend-name-preview {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-friend-name-preview.is-empty {
  display: none;
}

.phone-friends-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--wwm-gold);
  border-bottom: 2px solid var(--wwm-gold);
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.phone-friends-accordion[open] > .phone-friends-summary .phone-friends-chevron,
.phone-friend-panel[open] > .phone-friend-summary .phone-friends-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.phone-friends-body {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.phone-friends-lead {
  margin: 14px 0 12px;
}

.phone-friend-panel {
  margin-top: 10px;
}

.phone-friend-panel > summary {
  background: rgba(16, 36, 58, 0.35);
}

.phone-friend-panel[open] > summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.phone-friend-fields {
  padding: 14px 2px 4px;
}

input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed var(--wwm-border);
  background: rgba(7, 20, 33, 0.35);
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 1px solid var(--wwm-border);
  border-radius: 10px;
  background: rgba(16, 36, 58, 0.8);
  color: var(--text);
  padding: 8px 12px;
  font-family: inherit;
  cursor: pointer;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--wwm-navy-deep), var(--wwm-accent));
  color: var(--wwm-text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 20px rgba(47, 156, 255, 0.28);
  transition: transform .2s, box-shadow .2s;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(47, 156, 255, 0.4);
}

.btn-clear {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--wwm-border);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-clear:hover {
  border-color: var(--wwm-border-glow);
  color: var(--text);
  background: rgba(7, 20, 33, 0.5);
}

.btn-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--wwm-gold), var(--wwm-gold-deep));
  color: #071421;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 8px;
  box-shadow: 0 4px 20px rgba(246, 211, 101, 0.25);
}
.btn-next:hover { opacity: .92; }

.success-state {
  text-align: center;
  padding: 12px 0 4px;
}
.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: var(--wwm-ok);
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-state h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}
.success-state p { color: var(--muted); }
.success-actions { margin-top: 20px; }

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-left: auto;
}
.lang-toggle {
  display: inline-flex;
  gap: 4px;
}
.lang-pill {
  min-width: 40px;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
  background: rgba(7, 20, 33, 0.8);
  border: 1px solid var(--wwm-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.lang-pill.is-active,
.lang-pill.active {
  background: linear-gradient(135deg, var(--wwm-gold), var(--wwm-gold-deep));
  color: #071421;
  border-color: transparent;
}
.lang-pill:hover:not(.is-active):not(.active) {
  color: var(--text);
  border-color: var(--wwm-border-glow);
}

.hidden { display: none !important; }

@media (max-width: 600px) {
  .outer {
    align-items: flex-start;
    padding-top: 16px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .card {
    border-radius: var(--r-lg);
    padding: clamp(20px, 5vw, 28px);
  }
  .card-title { font-size: clamp(20px, 6vw, 26px); }
  .vote-btn {
    min-height: 52px;
    padding: 12px 14px;
    font-size: 15px;
  }
  .vote-letter {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .question-text { font-size: clamp(16px, 4.5vw, 20px); }
  .btn-submit,
  .btn-mobile { min-height: 48px; }
}

@media (max-width: 380px) {
  input { font-size: 16px; } /* prevents iOS zoom on focus */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
