/* ============================================================
   CONTENT GATING UI STYLES
   ============================================================ */

/* Content teaser dengan fade out effect */
.article-teaser {
  position: relative;
  max-height: 400px;
  overflow: hidden;
}

.article-content {
  position: relative;
}

.article-teaser.blurred {
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 86%,
    rgba(0, 0, 0, 0.55) 95%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 86%,
    rgba(0, 0, 0, 0.55) 95%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 1;
}

.article-teaser.blurred::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24%;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(18, 23, 32, 0) 0%,
    rgba(18, 23, 32, 0.12) 45%,
    rgba(18, 23, 32, 0.42) 78%,
    rgba(18, 23, 32, 0.74) 100%
  );
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
}

/* Overlay untuk menampilkan CTA */
.content-gate-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
  padding: 60px 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 250px;
  text-align: center;
  z-index: 10;
}

.content-gate-overlay h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.content-gate-overlay p {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.content-gate-overlay .btn {
  margin-top: 10px;
  min-width: 200px;
}

/* Hidden content section */
.article-content-full {
  display: none;
  margin-top: 30px;
}

.article-content-full.visible {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Login required badge */
.article-access-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 15px;
}

.article-access-badge.login-only {
  background-color: #e3f2fd;
  color: #1976d2;
}

.article-access-badge.premium-only {
  background-color: #fff3e0;
  color: #e65100;
}

/* ============================================================
   AUTH MODAL — otomatis ikut light/dark mode via Bootstrap vars
   Semua warna menggunakan CSS variables Bootstrap (--bs-*)
   sehingga langsung berubah saat tema di-toggle tanpa refresh.
   ============================================================ */

/* Overlay: fixed fullscreen, tepat di atas semua elemen Bootstrap */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1070;
  padding: 24px 16px;
}

/* Card modal — warna pakai Bootstrap vars, otomatis ikut tema */
.auth-modal-content {
  position: relative;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  padding: 36px 40px 32px;
  max-width: 460px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Header card */
.auth-modal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--bs-heading-color, var(--bs-body-color));
}

.auth-modal-subtitle {
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
  margin-bottom: 24px;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 12px;
  color: var(--bs-secondary-color);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bs-border-color);
}

/* Tombol tutup */
.auth-modal-content .close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--bs-secondary-color);
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.auth-modal-content .close-btn:hover {
  color: var(--bs-body-color);
  background: var(--bs-secondary-bg);
}

/* Input group */
.auth-input-group {
  margin-bottom: 14px;
}
.auth-input-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bs-body-color);
}
.auth-input-group input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--bs-border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.auth-input-group input::placeholder {
  color: var(--bs-secondary-color);
}
.auth-input-group input:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.15);
  background: var(--bs-body-bg);
}

.auth-password-toggle-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--bs-secondary-color);
  cursor: pointer;
  user-select: none;
}

.auth-password-toggle-check input {
  width: 14px;
  height: 14px;
  margin: 0;
}

/* Link daftar / masuk */
.auth-switch-link {
  display: block;
  text-align: center;
  font-size: 13px;
  margin: 12px 0 14px;
  color: var(--bs-secondary-color);
}
.auth-switch-link a {
  color: var(--bs-link-color);
  text-decoration: none;
  font-weight: 600;
}
.auth-switch-link a:hover {
  color: var(--bs-link-hover-color);
  text-decoration: underline;
}

/* Pesan error */
.auth-error-msg {
  color: #d32f2f;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

/* ============================================================
   NAV USER BUTTON (pojok kanan navbar)
   ============================================================ */
.nav-user-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-user-avatar {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-user-photo-btn {
  overflow: hidden;
}

.nav-user-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.nav-user-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Loading spinner untuk konten yang sedang di-fetch dari Firestore */
.content-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  opacity: 0.7;
}

