/* MaleCams.org additive layout + mobile fixes.
   Loaded after the legacy stylesheet so these rules can safely refine it. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.modal-open,
html.modal-open body { overflow: hidden; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, iframe, video { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
a { overflow-wrap: anywhere; }

.site-header {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 9px clamp(12px, 2vw, 24px);
  background: #fff;
}

.site-home-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.site-home-link:hover .site-title,
.site-home-link:focus-visible .site-title { text-decoration: underline; }

#logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
  border-radius: 5px;
}

.site-title {
  font-size: clamp(1rem, 2.6vw, 1.22rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .025em;
}

.main-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  padding: 7px clamp(10px, 2vw, 24px);
  overflow: visible;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.nav-right { justify-content: flex-end; }
.nav-simple-link,
.back-btn { line-height: 1.35; }

.auto-refresh-bar {
  margin-left: 2px;
  font-size: 13px;
}
.auto-refresh-bar label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #235ec6;
  cursor: pointer;
}
.auto-refresh-help {
  display: inline-block;
  position: relative;
  margin-left: 3px;
  color: #5473ab;
  cursor: help;
}
.auto-refresh-tooltip {
  display: none;
  position: absolute;
  left: calc(100% + 9px);
  top: 50%;
  z-index: 50;
  transform: translateY(-50%);
  width: min(280px, 75vw);
  padding: 11px 13px;
  border-radius: 8px;
  background: #222e39;
  color: #f5fafc;
  box-shadow: 0 8px 30px rgba(0,0,0,.28);
  line-height: 1.45;
  font-size: 13px;
  font-weight: 400;
}
.auto-refresh-help:hover .auto-refresh-tooltip,
.auto-refresh-help:focus .auto-refresh-tooltip { display: block; }

#main-content { min-width: 0; }
.seo-page-heading {
  margin: 16px 8px 4px;
  color: #1f2937;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  line-height: 1.18;
}
.seo-page-intro {
  max-width: 880px;
  margin: 0 8px 16px;
  color: #5b6472;
  line-height: 1.6;
  font-size: .96rem;
}

.site-footer {
  margin-top: 32px;
  padding: 24px 16px;
  text-align: center;
  color: #667085;
  background: #fff;
  border-top: 1px solid #eceff3;
}
.site-footer p { margin: 0; line-height: 1.6; }
.site-footer a { color: var(--primary-color, #666); }

.age-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(25, 27, 35, .95);
}
.age-box {
  width: min(440px, 100%);
  padding: clamp(24px, 5vw, 34px);
  border-radius: 14px;
  background: #fffbea;
  color: #6f531d;
  box-shadow: 0 14px 50px rgba(0,0,0,.24);
  text-align: center;
}
.age-box h2 { margin: 0 0 10px; color: #4d3a16; }
.age-box p { margin: 0; line-height: 1.65; }
.age-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.age-btn,
.age-btn-secondary,
.cookie-btn {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
}
.age-btn,
.cookie-btn { background: var(--primary-color, #808085); color: #fff; }
.age-btn-secondary { background: #e8dfbf; color: #795d27; }

.cookie-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 3500;
  width: min(360px, calc(100vw - 36px));
}
.cookie-box {
  padding: 18px;
  border: 1px solid #eadb9d;
  border-radius: 12px;
  background: #fffbea;
  color: #6d5527;
  box-shadow: 0 10px 35px rgba(70,50,0,.16);
}
.cookie-box h2 { margin: 0 0 8px; font-size: 1.05rem; color: #4d3a16; }
.cookie-box p { margin: 0 0 8px; line-height: 1.5; }
.cookie-privacy-link { display: inline-block; margin: 3px 0 12px; color: var(--primary-color, #666); }
.cookie-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
  font-weight: 600;
}
.cookie-toggle-row input { width: 20px; height: 20px; accent-color: var(--primary-color, #808085); }
.cookie-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

:focus-visible {
  outline: 2px solid #235ec6;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .main-navbar {
    align-items: flex-start;
    padding: 8px 10px;
  }
  .nav-left,
  .nav-right { gap: 7px; }
  .auto-refresh-bar,
  .auto-refresh-help { display: none !important; }
  .spotlight-guide-text { display: none; }
}

@media (max-width: 600px) {
  .site-header { min-height: 52px; padding: 7px 10px; }
  #logo { width: 36px; height: 36px; flex-basis: 36px; }
  .main-navbar { flex-direction: column; }
  .nav-left,
  .nav-right { width: 100%; justify-content: flex-start; }
  .nav-right { padding-top: 2px; }
  .seo-page-heading { margin-top: 12px; }

  .age-actions { flex-direction: column; }
  .age-btn,
  .age-btn-secondary { width: 100%; margin: 0; }

  .cookie-notice {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.guest-area-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 8px;
  padding: 7px 10px;
  border: 1px solid #e6eaf0;
  border-radius: 6px;
  background: #fff;
  color: #5b6472;
  font-size: 13px;
}
.guest-area-msg a { color: #235ec6; font-weight: 600; }
.guest-area-msg button {
  margin-left: auto;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: #777;
  cursor: pointer;
  font-size: 16px;
}

@media (max-width: 760px) {
  #main-flex-wrap { display: block !important; }
  .main-content { width: 100% !important; min-width: 0 !important; }
  #filter-sidebar.open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 5000 !important;
    width: min(90vw, 320px) !important;
    max-width: 320px !important;
    height: 100dvh !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 18px 14px !important;
    box-shadow: 12px 0 34px rgba(0,0,0,.18) !important;
    background: #fff !important;
  }
  #filter-sidebar:not(.open) {
    position: static !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  .model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding-inline: 8px !important;
  }
  .model-card-cb { min-width: 0 !important; width: 100% !important; }
  .model-img-cb { width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover; }
  .discovery-controls,
  #discovery-highlights { margin-left: 8px !important; margin-right: 8px !important; }
}

@media (max-width: 420px) {
  .model-grid { gap: 7px !important; }
  .model-info-cb { padding: 7px !important; }
  .subject-cb { font-size: 11px !important; line-height: 1.35 !important; }
  .username-cb { font-size: 12px !important; }
}
