/* ===========================================
   The Useful Pages — Shared Stylesheet
   =========================================== */

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Ad Zones -------------------------------- */
.ad-zone {
  width: 100%;
  text-align: center;
  overflow: hidden;
  margin: 1.5rem 0;
}

.ad-placeholder {
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 auto;
}

.dark .ad-placeholder {
  background: #1e293b;
  border-color: #334155;
  color: #64748b;
}

.ad-banner .ad-placeholder  { max-width: 728px; height: 90px; }
.ad-rectangle .ad-placeholder { width: 300px; height: 250px; }
.ad-responsive .ad-placeholder { max-width: 100%; height: 90px; }

/* --- Toast Notification ---------------------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1e293b;
  color: #f1f5f9;
  padding: 0.625rem 1.125rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  z-index: 9999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  max-width: 320px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* --- Transitions ----------------------------- */
.transition-colors-fast {
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* --- Animations ----------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeInUp 0.2s ease-out; }

/* --- Range Input ----------------------------- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
}

input[type="range"]::-webkit-slider-track {
  background: #e5e7eb;
  height: 6px;
  border-radius: 3px;
}

.dark input[type="range"]::-webkit-slider-track { background: #334155; }

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: #4f46e5;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  margin-top: -7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease, transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #4338ca;
  transform: scale(1.1);
}

/* --- Scrollbar ------------------------------ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f3f4f6; }
.dark ::-webkit-scrollbar-track { background: #1e293b; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* --- Focus ---------------------------------- */
:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }

/* --- Color Swatch --------------------------- */
.color-swatch {
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.color-swatch:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --- Print ---------------------------------- */
@media print {
  .ad-zone, nav, .no-print, #mobile-menu { display: none !important; }
  body { background: white !important; color: black !important; }
}
