/* Silver Talkies login — aligned with community3.5.css (option 3) */
:root {
  --st-brand: #2fadb1;
  --st-brand-dark: #2b9da1;
  --st-accent: #fe5780;
  --st-bg: #f7f7f7;
  --st-card: #ffffff;
  --st-text: #333333;
  --st-muted: #5c564e;
  --st-border: #dddddd;
  --st-error: #cf3f3b;
  --st-success: #60ae4a;
  --st-radius: 12px;
  --st-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --blue-gradient: linear-gradient(102.26deg, #34c0c5 0%, #2fadb1 99.99%, #2b9da1 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--st-font);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--st-text);
  background: var(--st-bg);
  overflow-x: hidden;
}

.login-page {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  padding: 0.4rem 1.25rem 0.5rem;
  box-sizing: border-box;
}

.login-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.org-logo {
  max-height: 60px;
  max-width: 180px;
  margin-bottom: 0.35rem;
}

.org-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--st-text);
  letter-spacing: 0.5px;
}

.org-subtitle {
  margin: 0;
  color: var(--st-muted);
  font-size: 1.05rem;
}

.login-card {
  background: var(--st-card);
  border-radius: var(--st-radius);
  padding: 0.85rem 1.25rem 0.9rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--st-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Prevent display:flex from overriding the HTML hidden attribute */
.login-card[hidden] {
  display: none !important;
}

.card-heading {
  font-size: 1.15rem;
  margin: 0;
  font-weight: 700;
  color: var(--st-text);
}

.tab-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
}

.st-mode-row {
  margin-bottom: 0.75rem;
}

.st-tab-mode {
  font-size: 1.05rem;
}

.st-action-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0;
}

@media (min-width: 400px) {
  .st-action-row {
    flex-direction: row;
  }

  .st-action-row .st-btn-primary,
  .st-action-row .st-btn-secondary,
  .st-action-row .btn-primary,
  .st-action-row .btn-secondary {
    flex: 1;
    margin-bottom: 0;
  }
}

.tab {
  flex: 1;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--st-border);
  border-radius: 8px;
  background: var(--st-bg);
  color: var(--st-text);
  cursor: pointer;
}

.tab.active {
  border-color: transparent;
  background: var(--blue-gradient);
  color: #fff;
}

.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.phone-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
  width: 100%;
  min-width: 0;
}

.country-select {
  flex-shrink: 0;
  width: 7.5rem;
  min-width: 0;
  padding: 0.65rem 0.5rem;
  font-size: 1rem;
  border: 2px solid var(--st-border);
  border-radius: 8px;
  background: #fff;
}

.country-select.narrow {
  width: 4.5rem;
}

.text-input {
  flex: 1;
  min-width: 0;
  width: 0;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  border: 2px solid var(--st-border);
  border-radius: 8px;
  min-height: 44px;
}

.text-input.full {
  width: 100%;
  margin-bottom: 0;
}

.text-input:focus,
.country-select:focus,
.tab:focus,
.st-btn-primary:focus,
.otp-digit:focus,
.st-otp-digit:focus {
  outline: 3px solid rgba(47, 173, 177, 0.35);
  outline-offset: 2px;
  border-color: var(--st-brand);
}

.error-msg {
  color: var(--st-error);
  font-size: 1rem;
  margin: 0 0 1rem;
  padding: 0.75rem;
  background: #fef3f2;
  border-radius: 8px;
}

.st-btn-primary,
.st-btn-secondary,
.btn-primary,
.btn-secondary,
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-bottom: 0;
  position: relative;
}

.st-btn-primary,
.btn-primary {
  background: var(--blue-gradient);
  color: #fff;
}

.st-btn-primary:hover:not(:disabled),
.btn-primary:hover:not(:disabled) {
  filter: brightness(0.95);
}

.st-btn-secondary,
.btn-secondary {
  background: #fff;
  color: var(--st-brand-dark);
  border: 2px solid var(--st-brand);
}

.btn-google {
  background: #fff;
  border: 2px solid var(--st-border);
  color: var(--st-text);
}

.btn-link,
.st-btn-link {
  background: none;
  border: none;
  color: var(--st-muted);
  font-size: 1rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.5rem 0;
}

.st-btn-primary:disabled,
.st-btn-secondary:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.st-btn-primary.is-loading .btn-label,
.btn-primary.is-loading .btn-label,
.st-btn-secondary.is-loading .btn-label,
.btn-secondary.is-loading .btn-label {
  visibility: hidden;
}

.btn-spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: st-spin 0.7s linear infinite;
  position: absolute;
}

.is-loading .btn-spinner {
  display: block;
}

.st-btn-secondary.is-loading .btn-spinner,
.btn-secondary.is-loading .btn-spinner {
  border-color: rgba(47, 173, 177, 0.25);
  border-top-color: var(--st-brand);
}

.fine-print {
  font-size: 0.82rem;
  color: var(--st-muted);
  text-align: center;
  margin: 0;
}

.st-step-badge {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--st-brand-dark);
  margin: 0 0 0.5rem;
}

.st-signup-summary {
  background: #eef9f9;
  border: 1px solid #c5e8ea;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.st-required {
  color: var(--st-error);
}

.text-input.st-readonly,
.st-readonly {
  background: #f0f0f0;
  color: var(--st-muted);
}

.otp-hint {
  color: var(--st-muted);
  margin: 0 0 1.25rem;
}

.otp-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.otp-digit,
.st-otp-digit {
  width: 2.75rem;
  height: 3.25rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--st-border);
  border-radius: 8px;
}

.login-footer {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--st-muted);
}

.login-footer a {
  color: var(--st-brand-dark);
  font-weight: 600;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(247, 247, 247, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000001;
}

.loading-overlay[hidden] {
  display: none;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--st-border);
  border-top-color: var(--st-brand);
  border-radius: 50%;
  animation: st-spin 0.8s linear infinite;
}

@keyframes st-spin {
  to {
    transform: rotate(360deg);
  }
}

.membership-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.plans-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .plans-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.plan-card {
  background: var(--st-card);
  border: 2px solid var(--st-border);
  border-radius: var(--st-radius);
  padding: 1.5rem;
}

.plan-card.featured {
  border-color: var(--st-brand);
}

.plan-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.plan-price {
  font-size: 1.75rem;
  color: var(--st-brand-dark);
  font-weight: 700;
  margin-bottom: 1rem;
}

.plan-desc {
  color: var(--st-muted);
  margin-bottom: 1rem;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--st-muted);
}

/* App download block — shown at bottom of Step 1 */
.app-download-block {
  margin-top: 0;
}

.app-download-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  color: var(--st-muted);
  font-size: 0.8rem;
}

.app-download-divider::before,
.app-download-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--st-border);
}

.app-qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.app-qr-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  padding: 0.35rem 0.3rem;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.app-qr-item a:hover {
  border-color: var(--st-brand);
  box-shadow: 0 2px 10px rgba(47, 173, 177, 0.12);
}

.app-qr-code {
  width: 100%;
  max-width: 78px;
  height: auto;
  display: block;
  border-radius: 4px;
}

.store-badge {
  height: 22px;
  width: auto;
  display: block;
}
