/* ============================================
   PrepX - components.css
   Buttons, cards, forms, navbar, footer
   ============================================ */

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:active { transform: translateY(2px); }

.btn-primary {
  background: var(--grad-main);
  color: #1a1206;
  box-shadow: 0 6px 24px rgba(255, 140, 26, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 140, 26, 0.5);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover { background: var(--surface-strong); }

.btn-google {
  background: #fff;
  color: #1f1f1f;
  width: 100%;
}

.btn-google:hover { background: #f1f1f1; }

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- CARDS (glass effect) ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 179, 71, 0.45);
}

/* ---------- BADGES ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 179, 71, 0.15);
  color: var(--amber);
  border: 1px solid rgba(255, 179, 71, 0.35);
}

/* ---------- FORMS ---------- */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.input {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, background 0.2s;
}

.input::placeholder { color: #6f748f; }

.input:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--surface-strong);
}

.input.is-invalid { border-color: var(--red); }

.error-text {
  display: none;
  margin-top: 5px;
  font-size: 0.82rem;
  color: var(--red);
}

.input.is-invalid + .error-text { display: block; }

select.input option { background: var(--bg-soft); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- NAVBAR (filled by layout.js) ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(5, 6, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.4rem;
}

.nav-logo img { height: 44px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--amber); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  font-size: 1.6rem;
  color: var(--text);
}

/* ---------- FOOTER (filled by layout.js) ---------- */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer li { margin-bottom: 10px; }

.footer a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer a:hover { color: var(--amber); }

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- RESPONSIVE (mobile friendly) ---------- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    width: 100%;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}
/* ---------- COOKIE NOTICE ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(11, 13, 28, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cookie-banner p { flex: 1; margin: 0; font-size: 0.88rem; }
.cookie-banner a { color: var(--amber); font-weight: 600; }
.cookie-banner .btn { flex-shrink: 0; padding: 9px 20px; font-size: 0.9rem; }

@media (max-width: 520px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
}