/* ==========================================================================
   Freelance Rate vs. Retainer Calculator - Custom Stylesheet
   Tailored for High-RPM Passive Monetization & Exceptional UI/UX
   ========================================================================== */

:root {
  --brand-primary: #059669; /* Emerald 600 */
  --brand-primary-light: #10b981; /* Emerald 500 */
  --brand-primary-dark: #047857; /* Emerald 700 */
  --brand-accent: #6366f1; /* Indigo 500 */
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
}

/* Custom Range Slider Track & Thumb */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--brand-primary);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.45);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--brand-primary);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
  cursor: grab;
}

input[type="range"]:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 3px;
}

/* Clean numeric inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Semantic AdSense Placeholders */
.adsense-placeholder {
  background: repeating-linear-gradient(
    45deg,
    #f8fafc,
    #f8fafc 10px,
    #f1f5f9 10px,
    #f1f5f9 20px
  );
  border: 1.5px dashed #cbd5e1;
  transition: border-color 0.2s ease;
}

.adsense-placeholder:hover {
  border-color: #94a3b8;
}

/* Rate Health Diagnostic Glows */
.health-badge-good {
  background-color: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.health-badge-warning {
  background-color: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.health-badge-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Modal styling for Privacy / Terms / Embed */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

/* FAQ Details/Summary Accordion */
details > summary {
  list-style: none;
  cursor: pointer;
}
details > summary::-webkit-details-marker {
  display: none;
}
details[open] summary svg {
  transform: rotate(180deg);
}

/* Mobile Navigation Drawer */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 340px);
  background-color: #ffffff;
  box-shadow: -4px 0 25px rgba(15, 23, 42, 0.15);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

/* Filter Pills for Tools Directory */
.filter-pill {
  transition: all 0.15s ease-in-out;
}
.filter-pill.active {
  background-color: #059669;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.25);
}

/* Google AdSense Optimization & Zero-CLS Layout */
.adsense-slot {
  width: 100%;
  margin: 1.5rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  clear: both;
}

.adsense-card {
  width: 100%;
  max-width: 56rem; /* max-w-4xl */
  min-height: 90px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease;
}

.adsbygoogle {
  display: block !important;
  margin: 0 auto;
  max-width: 100%;
}

/* Print Optimization */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
  }

  .no-print,
  .adsense-placeholder,
  aside[role="region"],
  button,
  .toast-notification,
  .modal-overlay,
  .mobile-nav-backdrop,
  .mobile-nav-drawer,
  #faqSection {
    display: none !important;
  }
}
