/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
}

.btn--primary:active {
  transform: scale(0.98);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--ghost:hover {
  background: var(--color-bg);
}

.btn--danger {
  background: var(--color-danger);
  color: var(--color-white);
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── FORMS & INPUTS ── */
.form-group {
  margin-bottom: var(--space-lg);
  position: relative;
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #374151; /* Dark gray */
  margin-bottom: var(--space-xs);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-family: var(--font-sans);
  background: var(--color-white);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input::placeholder {
  color: #a0aec0; /* Soft grey placeholder */
  font-weight: 400;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(94, 23, 235, 0.1);
}

/* Eye Toggle Icon inside Password field */
.password-toggle-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: #a0aec0;
  transition: color 0.2s ease;
}

.password-toggle-btn:hover {
  color: var(--color-text);
}

.password-toggle-btn svg {
  width: 20px;
  height: 20px;
}

/* Error States */
.form-group--error .form-input {
  border-color: #fca5a5 !important; /* light red border */
  background-color: var(--color-error-bg) !important; /* light red bg */
  color: #b91c1c; /* dark red text for value */
}

.form-group--error .password-toggle-btn {
  color: #fca5a5;
}

.form-group--error .password-toggle-btn:hover {
  color: #b91c1c;
}

.form-error {
  font-size: var(--font-size-sm);
  color: var(--color-danger);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* ── CHECKBOX & EXTRA ── */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  font-size: var(--font-size-sm);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #9ca3af;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.checkbox-input:checked {
  border-color: #111827; /* Dark black border */
  background-color: transparent;
}

.checkbox-input:checked::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #111827;
  border-bottom: 2px solid #111827;
  transform: rotate(-45deg) translate(1px, -1px);
}

.forgot-password-link {
  color: var(--color-primary);
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.forgot-password-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ── TRUST BAR ────────────────────────────────────── */
.trust-bar {
  background: #5E17EB; /* Deep vibrant purple */
  color: #fff;
  padding: 80px 0;
}

.trust-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.trust-item__icon {
  margin-bottom: 8px;
  color: #fff;
}

.trust-item strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.trust-item p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  max-width: 240px;
  margin: 0 auto;
}

/* ── FOOTER ───────────────────────────────────────── */
.site-footer {
  background: #fafafa;
  border-top: 1px solid #e5e7eb;
  padding: 40px 0;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.site-footer__left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
}

.site-footer__logo-icon {
  width: 32px;
  height: 32px;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer__copyright {
  font-size: 0.85rem;
  color: #6b7280;
}

.site-footer__center {
  display: flex;
  gap: 32px;
  align-items: center;
}

.site-footer__center a {
  font-size: 0.9rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__center a:hover {
  color: #111827;
}

.site-footer__right {
  display: flex;
  align-items: center;
}

.site-footer__globe {
  color: #5E17EB;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.site-footer__globe:hover {
  opacity: 0.8;
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 1024px) {
  .trust-bar__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .site-footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .site-footer__left,
  .site-footer__center {
    align-items: center;
  }

  .site-footer__center {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .trust-bar__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ── TOAST NOTIFICATIONS ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-size: var(--font-size-sm);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast--success {
  background: var(--color-success);
}

.toast--error {
  background: var(--color-danger);
}

@keyframes slide-in {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── LOADER ── */
.loader {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  margin: var(--space-2xl) auto;
  animation: spin 0.7s linear infinite;
}

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

/* ── TERMS MODAL ── */
.terms-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.terms-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.terms-modal-content {
  background: #fdfdfd;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.terms-modal-overlay.show .terms-modal-content {
  transform: translateY(0);
}

.terms-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.terms-modal-header {
  padding: 32px 32px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.terms-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.terms-modal-subtitle {
  font-size: 0.95rem;
  color: #6b7280;
}

.terms-modal-body {
  padding: 24px 32px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.6;
}

.terms-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.terms-section ul {
  padding-left: 20px;
  margin-top: 8px;
}

.terms-modal-footer {
  padding: 24px 32px;
  border-top: 1px solid #e5e7eb;
}

.terms-modal-btn {
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.terms-modal-btn:hover {
  background: #642bc2;
}

/* Spinner for Buttons */
.btn-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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