/* =========================================================
   VURT — GLOBAL SCROLLBAR & FORM CONTROLS
   Beautiful, consistent scrollbars + dropdowns across every page
   ========================================================= */

/* ── Scrollbar — Slim, elegant, appears on hover ─────────── */

/* WebKit / Blink (Chrome, Edge, Safari, Opera) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}
::-webkit-scrollbar-thumb:active {
  background: rgba(255, 255, 255, 0.25);
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.07) transparent;
}

/* Show scrollbar only on hover for containers */
.scroll-fade {
  scrollbar-width: none;
}
.scroll-fade::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.scroll-fade:hover {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.scroll-fade:hover::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scroll-fade:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

/* ── Select / Dropdown — Modern dark theme ───────────────── */

select,
.field select,
.form-control select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 9px 36px 9px 13px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.04);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  color: #f5f5fa;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

select:hover,
.field select:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.06);
}

select:focus,
.field select:focus {
  border-color: rgba(230, 170, 7, 0.4);
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(230, 170, 7, 0.08);
}

/* Multi-select */
select[multiple] {
  background-image: none;
  padding: 6px;
}
select[multiple] option {
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 2px;
  color: #b3b3b3;
  background: transparent;
  transition: background 0.1s ease;
}
select[multiple] option:checked,
select[multiple] option:hover {
  background: rgba(230, 170, 7, 0.12);
  color: #fdd64a;
}

/* Option styling (where supported) */
option {
  background: #1a1a25;
  color: #e5e5ea;
  padding: 8px 12px;
}

/* ── Input polish — consistent focus rings ───────────────── */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-color: rgba(230, 170, 7, 0.35);
  box-shadow: 0 0 0 3px rgba(230, 170, 7, 0.06);
}

/* Nav search inputs should not get the gold focus ring */
.nav-search input:focus,
.nav-drawer-search input:focus {
  border-color: transparent;
  box-shadow: none;
}

/* ── Checkbox — Custom styled ────────────────────────────── */

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
input[type="checkbox"]:hover {
  border-color: rgba(230, 170, 7, 0.5);
  background: rgba(230, 170, 7, 0.06);
}
input[type="checkbox"]:checked {
  background: #e6aa07;
  border-color: #e6aa07;
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(230, 170, 7, 0.15);
}

/* ── Range / Slider ──────────────────────────────────────── */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e6aa07;
  border: 2px solid #000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(230, 170, 7, 0.15);
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e6aa07;
  border: 2px solid #000;
  cursor: pointer;
}

/* ── Placeholder text ────────────────────────────────────── */

::placeholder {
  color: rgba(255, 255, 255, 0.25);
  opacity: 1;
}
::-webkit-input-placeholder { color: rgba(255, 255, 255, 0.25); }
::-moz-placeholder { color: rgba(255, 255, 255, 0.25); opacity: 1; }

/* ── Selection highlight ─────────────────────────────────── */

::selection {
  background: rgba(230, 170, 7, 0.3);
  color: #fff;
}
::-moz-selection {
  background: rgba(230, 170, 7, 0.3);
  color: #fff;
}

/* ── Lazy Loading — Placeholders & Fade-in ─────────────── */

/* Shimmer placeholder for images/thumbnails not yet loaded */
.lazy-placeholder {
  background: rgba(255, 255, 255, 0.03);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0.03) 80%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Lazy background images — hidden until IntersectionObserver triggers */
.lazy-bg {
  background-image: none !important;
}
.lazy-bg.loaded {
  background-image: var(--lazy-bg) !important;
}

/* Fade-in for lazy-loaded <img> elements */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}
img[loading="lazy"].loaded,
img.loaded {
  opacity: 1;
}
/* Images that have already completed loading (e.g. cached) */
img[loading="lazy"][complete] {
  opacity: 1;
}
