/*
 * Rizzfan theme
 * Loaded after Sngine's style.css, only overrides. Keep Sngine's own files untouched
 * so theme updates from Sngine merge cleanly (see the git "upstream" branch).
 */

/* == Palette == */
:root {
  --rz-blue: #1f6feb;
  --rz-blue-dark: #1a5fd0;
  --rz-sky: #0ea5e9;
  --rz-gradient: linear-gradient(135deg, #1d4ed8 0%, #1f6feb 45%, #0ea5e9 100%);
  --rz-soft: rgba(31, 111, 235, 0.10);
  --rz-ring: rgba(31, 111, 235, 0.28);
  --rz-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
  --rz-radius: 18px;

  /* Sngine variables */
  --body-bg-color: #f2f5fa;
  --body-color: #0f172a;
  --link-color: #1f6feb;
  --header-bg-color: #ffffff;
  --plyr-color-main: #1f6feb;

  /* night mode: navy instead of grey */
  --body-bg-color-dark: #0b1220;
  --body-color-dark: #d7e2f3;
  --header-bg-color-dark: #0f1829;
  --card-dark-color: #131d31;
  --card-dark-divider: #22314d;
  --card-dark-hover: #1a2640;
  --card-dark-input: #0d1626;
  --card-dark-input-color: #e6eefb;

  /* Bootstrap */
  --bs-primary: #1f6feb;
  --bs-primary-rgb: 31, 111, 235;
  --bs-link-color: #1f6feb;
  --bs-link-color-rgb: 31, 111, 235;
  --bs-link-hover-color: #1a5fd0;
  --bs-focus-ring-color: var(--rz-ring);
}

body {
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(31, 111, 235, 0.22);
}

/* == Icons == */
.main-icon,
.main-icon *,
.x-form-tools,
body.night-mode .main-icon,
body.night-mode .main-icon *,
body.night-mode .x-form-tools {
  color: var(--rz-blue) !important;
  fill: var(--rz-blue) !important;
}

/* == Buttons == */
.btn {
  border-radius: 12px;
  font-weight: 500;
}

.btn-primary,
.btn-primary.disabled,
.btn-primary:disabled,
.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle {
  color: #fff;
  border-color: transparent;
  background: var(--rz-gradient);
  background-color: var(--rz-blue);
}

.btn-primary {
  box-shadow: 0 6px 16px rgba(31, 111, 235, 0.25);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
  color: #fff;
  border-color: transparent;
  background: var(--rz-gradient);
  filter: brightness(1.06);
  box-shadow: 0 8px 22px rgba(31, 111, 235, 0.32);
}

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

.btn-primary.focus,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus,
.btn-primary:not(:disabled):not(.disabled):active:focus,
.show > .btn-primary.dropdown-toggle:focus {
  box-shadow: 0 0 0 4px var(--rz-ring);
}

.btn-outline-primary {
  color: var(--rz-blue);
  border-color: var(--rz-blue);
}

.btn-outline-primary:hover,
.btn-outline-primary:not(:disabled):not(.disabled).active,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.show > .btn-outline-primary.dropdown-toggle {
  color: #fff;
  border-color: var(--rz-blue);
  background-color: var(--rz-blue);
}

.btn-outline-primary.disabled,
.btn-outline-primary:disabled {
  color: var(--rz-blue);
}

.btn-outline-primary.focus,
.btn-outline-primary:focus,
.btn-outline-primary:not(:disabled):not(.disabled).active:focus,
.btn-outline-primary:not(:disabled):not(.disabled):active:focus {
  box-shadow: 0 0 0 4px var(--rz-ring);
}

.bg-primary {
  background: var(--rz-blue) !important;
}

.bg-gradient-primary,
.bg-gradient-blue {
  background: var(--rz-gradient) !important;
}

.text-primary {
  color: var(--rz-blue) !important;
}

.badge.bg-primary,
.badge-primary {
  background: var(--rz-blue) !important;
}

/* == Forms == */
.form-control:focus,
.form-select:focus {
  border-color: rgba(31, 111, 235, 0.55);
  box-shadow: 0 0 0 4px var(--rz-ring);
}

.form-check-input:checked {
  background-color: var(--rz-blue);
  border-color: var(--rz-blue);
}

.form-switch .form-check-input:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 4px var(--rz-ring);
}

/* == Cards == */
.card {
  border-radius: var(--rz-radius);
  box-shadow: var(--rz-shadow);
}

.card-header {
  border-radius: var(--rz-radius) var(--rz-radius) 0 0 !important;
}

.card-footer {
  border-radius: 0 0 var(--rz-radius) var(--rz-radius) !important;
}

body.night-mode .card {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* == Header == */
.main-header {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 6px 20px rgba(15, 23, 42, 0.04);
}

body.night-mode .main-header {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 20px rgba(0, 0, 0, 0.3);
}

.main-header .search-wrapper .form-control {
  border-radius: 14px;
}

/* == Side navigation == */
.side-nav > li > a {
  border-radius: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}

.side-nav > li > a:hover {
  background: var(--rz-soft);
}

.side-nav > li.active > a {
  color: var(--rz-blue);
  background: var(--rz-soft);
  font-weight: 600;
}

body.night-mode .side-nav > li > a:hover,
body.night-mode .side-nav > li.active > a {
  background: rgba(31, 111, 235, 0.18);
}

/* == Tabs & pills == */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background: var(--rz-gradient);
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: var(--rz-blue);
}

/* == Dropdowns & modals == */
.dropdown-menu {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
}

.dropdown-item {
  border-radius: 8px;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--rz-blue);
}

.modal-content {
  border: 0;
  border-radius: 20px;
}

/* == Posts == */
.post-stats-alt,
.post-stats .fa {
  color: var(--rz-blue);
}

/* == Links in night mode: a lighter blue reads better on navy == */
body.night-mode {
  --link-color: #5aa2ff;
  --bs-link-color: #5aa2ff;
  --bs-link-color-rgb: 90, 162, 255;
}

body.night-mode .side-nav > li.active > a,
body.night-mode .nav-tabs .nav-link.active {
  color: #7db6ff;
}

/* == Scrollbars (webkit) == */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
  background-clip: content-box;
}

/* == Main side navigation (feed sidebar) == */
.main-side-nav > li > a {
  border-radius: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-side-nav > li > a:hover {
  background-color: var(--rz-soft);
}

.main-side-nav > li.active > a {
  background-color: var(--rz-soft);
  color: var(--rz-blue);
  font-weight: 600;
  border-radius: 12px;
}

body.night-mode .main-side-nav a:hover,
body.night-mode .main-side-nav > li.active > a {
  background-color: rgba(31, 111, 235, 0.18);
  color: #fff;
  border-radius: 12px;
}

body.night-mode .main-side-nav > li.active > a {
  color: #7db6ff;
}

.main-side-nav ul a {
  border-left-color: rgba(31, 111, 235, 0.25);
}

/* =====================================================================
 * Landing page (index.landing.tpl, "elengine" branch)
 * ===================================================================== */
.rz-landing {
  --rz-l-bg: #f2f6fd;
  --rz-l-text: #0f172a;
  --rz-l-muted: #475569;
  --rz-l-card: rgba(255, 255, 255, 0.92);
  --rz-l-border: rgba(15, 23, 42, 0.08);
  --rz-l-chip: #ffffff;
  position: relative;
  min-height: 100vh;
  margin-top: -70px; /* no header on the landing */
  padding: 56px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--rz-l-bg);
  color: var(--rz-l-text);
}

body.night-mode .rz-landing {
  --rz-l-bg: #0a1120;
  --rz-l-text: #eef4ff;
  --rz-l-muted: #9fb0cc;
  --rz-l-card: rgba(19, 29, 49, 0.88);
  --rz-l-border: rgba(255, 255, 255, 0.08);
  --rz-l-chip: rgba(255, 255, 255, 0.06);
}

/* background blobs */
.rz-landing-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rz-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}

.rz-blob-1 {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -120px;
  background: #3b82f6;
}

.rz-blob-2 {
  width: 460px;
  height: 460px;
  bottom: -180px;
  right: -100px;
  background: #0ea5e9;
}

.rz-blob-3 {
  width: 300px;
  height: 300px;
  top: 30%;
  left: 45%;
  background: #6366f1;
  opacity: 0.25;
}

body.night-mode .rz-blob {
  opacity: 0.35;
}

.rz-landing-inner {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding-bottom: 40px;
}

.rz-landing-inner > .row {
  width: 100%;
  margin: 0;
}

/* logo */
.rz-logo img {
  height: 48px;
  width: auto;
}

.rz-logo-dark,
body.night-mode .rz-logo-light {
  display: none;
}

body.night-mode .rz-logo-dark {
  display: inline-block;
}

/* intro */
.rz-intro {
  position: relative;
}

.rz-title {
  margin: 36px 0 16px;
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--rz-l-text);
}

.rz-title span {
  background: var(--rz-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rz-lead {
  max-width: 460px;
  font-size: 18px;
  color: var(--rz-l-muted);
  margin-bottom: 24px;
}

.rz-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.rz-features li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--rz-l-chip);
  border: 1px solid var(--rz-l-border);
  font-size: 14px;
  font-weight: 500;
  color: var(--rz-l-text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.rz-features i {
  color: var(--rz-blue);
}

body.night-mode .rz-features i {
  color: #7db6ff;
}

.rz-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.rz-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.rz-app-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.26);
}

body.night-mode .rz-app-btn {
  background: #fff;
  color: #0f172a !important;
}

.rz-app-btn i {
  font-size: 28px;
  color: #3ddc84;
}

.rz-app-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-weight: 600;
  font-size: 18px;
}

.rz-app-btn small {
  font-weight: 400;
  font-size: 11px;
  opacity: 0.75;
}

.rz-link-btn {
  font-weight: 600;
  color: var(--rz-blue);
}

body.night-mode .rz-link-btn {
  color: #7db6ff;
}

.rz-link-btn i {
  margin-left: 4px;
  transition: transform 0.15s ease;
}

.rz-link-btn:hover i {
  transform: translateX(3px);
}

/* phone mockup */
.rz-phone {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(6deg);
  width: 210px;
  height: 420px;
  padding: 10px;
  border-radius: 36px;
  background: #0f172a;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.3);
}

.rz-phone-screen {
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #f2f5fa;
}

.rz-phone-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 10px;
  background: #fff;
  font-size: 14px;
  color: #0f172a;
}

.rz-phone-bar img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.rz-phone-stories {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
}

.rz-phone-stories span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(#fff, #fff) padding-box, var(--rz-gradient) border-box;
  border: 2.5px solid transparent;
}

.rz-phone-stories span.add {
  background: #e2e8f0;
  border-color: #e2e8f0;
}

.rz-phone-post {
  margin: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
}

.rz-phone-post .head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rz-phone-post .av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rz-gradient);
}

.rz-phone-post .lines {
  flex: 1;
}

.rz-phone-post .lines i {
  display: block;
  height: 7px;
  width: 70%;
  border-radius: 4px;
  background: #e2e8f0;
}

.rz-phone-post .lines i.s {
  width: 40%;
  margin-top: 5px;
}

.rz-phone-post .media {
  height: 150px;
  margin: 10px -10px;
  background: linear-gradient(160deg, #93c5fd, #1f6feb 60%, #0ea5e9);
}

.rz-phone-post .actions {
  display: flex;
  gap: 16px;
  color: #94a3b8;
  font-size: 14px;
}

.rz-phone-post .actions .fa-heart {
  color: #f43f5e;
}

/* sign in card (wraps Sngine's elengine sign form) */
.rz-auth-card {
  position: relative;
  padding: 8px 32px 32px;
  border-radius: 24px;
  background: var(--rz-l-card);
  border: 1px solid var(--rz-l-border);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.rz-auth-card .fr_welcome_title {
  font-size: 24px;
  font-weight: 700;
  color: var(--rz-l-text);
}

.rz-auth-card .fr_welcome_field input {
  border-radius: 14px;
  border: 1px solid var(--rz-l-border);
  background: #f5f8fd;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.night-mode .rz-auth-card .fr_welcome_field input {
  background: #0d1626;
  color: #e6eefb;
}

.rz-auth-card .fr_welcome_field input:focus {
  border-color: rgba(31, 111, 235, 0.6);
  box-shadow: 0 0 0 4px var(--rz-ring);
  outline: 0;
}

.rz-auth-card .fr_welcome_btn {
  height: 52px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
}

.rz-auth-card a {
  color: var(--rz-blue);
}

body.night-mode .rz-auth-card a {
  color: #7db6ff;
}

/* footer */
.rz-landing-footer {
  position: relative;
  padding-bottom: 8px;
}

.rz-landing-footer .footer {
  border-top: 0;
  color: var(--rz-l-muted);
}

/* mobile */
@media (max-width: 991.98px) {
  .rz-landing {
    padding-top: 28px;
  }

  .rz-intro {
    text-align: center;
  }

  .rz-logo img {
    height: 40px;
  }

  .rz-title {
    margin-top: 20px;
    font-size: 36px;
  }

  .rz-lead {
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
  }

  .rz-features,
  .rz-cta {
    justify-content: center;
  }

  .rz-features {
    margin-bottom: 20px;
  }

  .rz-auth-card {
    padding: 4px 20px 24px;
  }
}

/* landing fixes */
body:has(.rz-landing) {
  padding-top: 0;
  background: #f2f6fd;
}

body.night-mode:has(.rz-landing) {
  background: #0a1120;
}

.rz-landing {
  margin-top: 0;
}

@media (min-width: 992px) {
  .rz-intro {
    padding-right: 250px;
  }

  .rz-phone {
    right: 0;
    width: 200px;
    height: 400px;
  }
}

/* Sngine's elengine form draws its own dark box, the card already provides one */
.rz-auth-card .fr_auth_form,
body.night-mode .rz-auth-card .fr_auth_form {
  background: transparent;
  padding: 0;
  margin: 0;
  box-shadow: none;
  border: 0;
  max-width: none;
  width: 100%;
}

.rz-auth-card .form-check-label {
  white-space: nowrap;
}

@media (max-width: 400px) {
  .rz-auth-card .fr_auth_form .d-flex.align-items-center.justify-content-between {
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* small phones: get the sign in form closer to the top */
@media (max-width: 575.98px) {
  .rz-features {
    display: none;
  }

  .rz-title {
    font-size: 32px;
  }
}

/* == Profile / page / group covers: brand gradient when there is no cover photo == */
.profile-cover-wrapper,
body.night-mode .profile-cover-wrapper {
  background: var(--rz-gradient);
  border-radius: 0 0 var(--rz-radius) var(--rz-radius);
}

body.night-mode .profile-cover-wrapper {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #0369a1 100%);
}

/* verified badge on top of the blue cover: white halo so it stays visible */
.profile-name-wrapper .verified-badge svg,
.profile-name-wrapper .verified-badge i,
.profile-name-wrapper .verified-badge img {
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff);
}
