/* ═══════════════════════════════════════════════════════
   ProSprach Beta — Custom overrides for W3.CSS
   ═══════════════════════════════════════════════════════ */

/* ── Sticky header ───────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ── Language switcher ───────────────────────────────── */
.lang-btn {
  background: none;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.5;
  transition: all 0.2s;
}
.lang-btn:hover { opacity: 0.8; }
.lang-btn.active {
  opacity: 1;
  border-color: #4caf50;
  background: #e8f5e9;
}

/* ── Terms accordion ─────────────────────────────────── */
.terms-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.terms-body.open { max-height: 600px; }
.terms-toggle .arrow { transition: transform 0.3s; font-size: 0.8rem; }
.terms-toggle.open .arrow { transform: rotate(180deg); }

/* ── Loading spinner on submit button ────────────────── */
.w3-btn.loading {
  position: relative;
  color: transparent !important;
}
.w3-btn.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast / snackbar ────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  max-width: 90vw;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}
#toast.show {
  opacity: 1;
  visibility: visible;
}

/* ── Hero gradient ───────────────────────────────────── */
.hero-gradient {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
}

/* ── Section spacing ─────────────────────────────────── */
section { scroll-margin-top: 70px; }

/* ── Form disabled state ─────────────────────────────── */
#signupForm.disabled .w3-input,
#signupForm.disabled .w3-select,
#signupForm.disabled .w3-btn {
  background: #f5f5f5 !important;
  pointer-events: none;
  opacity: 0.5;
}
#signupForm .disabled-msg { display: none; }
#signupForm.disabled .disabled-msg { display: block; }

/* ── Required asterisk ───────────────────────────────── */
.required-asterisk {
  color: #e53935;
  font-weight: 700;
}

/* ── Planned year field toggle ───────────────────────── */
#planned_year_field { transition: all 0.2s; }

/* ── Submit button disabled state (high specificity to override w3-green !important) ── */
#signupForm.disabled button#submitBtn.w3-btn,
button#submitBtn.w3-btn.w3-green[disabled] {
  background: #9e9e9e !important;
  color: #e0e0e0 !important;
  cursor: not-allowed;
  opacity: 0.65;
}

/* ── Terms hint text ─────────────────────────────────── */
.terms-hint {
  font-size: 0.85rem;
  color: #e65100;
  margin: 0.5rem 0 0;
  padding: 0 0.5rem;
  font-weight: 500;
}
.terms-hint.hidden {
  display: none;
}

/* ── Cookie Consent Banner (GDPR) ────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #2d2d2d;
  color: #eee;
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.3);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.show {
  transform: translateY(0);
}
.cookie-banner .w3-content {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.cookie-banner p {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.cookie-banner .cookie-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.cookie-banner .cookie-btn:hover {
  opacity: 0.85;
}
.cookie-banner .cookie-btn.accept {
  background: #4caf50;
  color: #fff;
}
.cookie-banner .cookie-btn.info {
  background: transparent;
  color: #90caf9;
  text-decoration: underline;
}

/* ── Impressum Modal ─────────────────────────────────── */
.impressum-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.55);
  overflow-y: auto;
}
.impressum-overlay.open {
  display: block;
}
.impressum-modal {
  position: relative;
  max-width: 680px;
  margin: 2rem auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  padding: 2rem 1.5rem 1.5rem;
  animation: modalFadeIn 0.25s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.impressum-modal .close-btn {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0.25rem;
}
.impressum-modal .close-btn:hover {
  color: #333;
}
.impressum-modal h2 {
  font-size: 1.3rem;
  margin: 0 0 0.25rem;
  color: #333;
}
.impressum-modal .impressum-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 1.25rem;
}
.impressum-modal .impressum-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.impressum-modal .impressum-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}
.impressum-modal .impressum-list li:last-child {
  border-bottom: none;
}
.impressum-modal .impressum-list li strong {
  flex: 0 0 130px;
  font-size: 0.85rem;
  color: #555;
}
.impressum-modal .impressum-list li span {
  flex: 1;
  font-size: 0.9rem;
  color: #333;
  min-width: 180px;
}
.impressum-modal .impressum-list li a {
  color: #1976d2;
  text-decoration: none;
}
.impressum-modal .impressum-list li a:hover {
  text-decoration: underline;
}

/* ── Success Modal (reuses impressum-overlay pattern) ── */
.success-modal {
  text-align: center;
  padding: 2.5rem 2rem !important;
}
.success-modal .success-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.success-modal h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem !important;
}
.success-modal p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Responsive tweaks ───────────────────────────────── */
@media (max-width: 600px) {
  .prof-list .w3-tag {
    margin-bottom: 0.25rem;
  }
  .hero-gradient h1 {
    font-size: 1.8rem;
  }
  .cookie-banner .w3-content {
    flex-direction: column;
    text-align: center;
  }
  .cookie-banner .cookie-actions {
    width: 100%;
    justify-content: center;
  }
  .impressum-modal {
    margin: 1rem;
    padding: 1.5rem 1rem 1rem;
  }
  .impressum-modal .impressum-list li {
    flex-direction: column;
  }
  .impressum-modal .impressum-list li strong {
    flex-basis: auto;
  }
}

/* ── Google Sign-In section ─────────────────────────── */
#googleSection {
margin-bottom: 1rem;
}
#googleSignInBtn {
min-height: 48px;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
border: 2px dashed #ccc;
border-radius: 8px;
background: #fafafa;
}
#googleSignInBtn > div > iframe {
max-width: 100% !important;
}
#googleLoggedIn {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75rem;
padding: 0.75rem;
border: 1px solid #e0e0e0;
border-radius: 8px;
background: #fafafa;
}
#email[readonly] {
background: #f5f5f5 !important;
color: #555 !important;
cursor: not-allowed;
border-color: #ddd !important;
flex: 1;
min-width: 200px;
}
#switchGoogleBtn {
transition: background 0.2s;
white-space: nowrap;
}
#switchGoogleBtn:hover {
background: #e8eaf6 !important;
border-color: #5c6bc0 !important;
}
#signupForm.disabled #googleSection {
opacity: 0.4;
pointer-events: none;
}
#signupForm.disabled #googleSection iframe {
pointer-events: none !important;
}
