/*
Theme Name: TS Cams
Theme URI: 
Author: 
Description: Trans cam site theme for use with WP Chaturbate plugin.
Version: 1.0.0
License: GPL2
Text Domain: tscams
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', sans-serif; font-size: 14px; line-height: 1.5; color: #111; background: #f7f7f7; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ─── Typography ─────────────────────────────────────── */
h1, h2, h3, h4 { font-family: 'Inter', sans-serif; font-weight: 800; line-height: 1.2; letter-spacing: -0.3px; color: #111; }
p { margin-bottom: 1rem; }

/* ─── Layout ─────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-content { flex: 1; padding: 0; }

/* ─── Header ─────────────────────────────────────────── */
.site-header {
  background: #111;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: none;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 1rem;
}
.site-logo {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  white-space: nowrap;
}
.site-logo a { color: #fff; }
.site-logo span { color: #9333ea; }

/* ─── Navigation ─────────────────────────────────────── */
.main-navigation { display: flex; align-items: center; }
.main-navigation ul { list-style: none; display: flex; gap: 0; align-items: center; }
.main-navigation ul li a {
  font-size: 12px;
  font-weight: 500;
  color: #777;
  padding: 0 12px;
  transition: color 0.15s;
}
.main-navigation ul li a:hover { color: #ccc; }
.main-navigation ul li.current-menu-item a { color: #fff; }
.main-navigation ul li:last-child a {
  background: #9333ea;
  color: #fff !important;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
  transition: background 0.15s;
}
.main-navigation ul li:last-child a:hover { background: #7c22d4; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #333;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #777;
}

/* ─── Filter Bar ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0;
  margin-bottom: 0;
}
.filter-label { display: none; }
.filter-pill {
  padding: 11px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #888;
  margin-bottom: -1px;
  transition: color 0.15s;
  border-radius: 0;
}
.filter-pill:hover { color: #333; }
.filter-pill.active { color: #111; border-bottom-color: #9333ea; font-weight: 600; }
.filter-count {
  font-size: 11px;
  font-weight: 500;
  color: #bbb;
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* ─── Cam Grid ───────────────────────────────────────── */
.cam-grid-wrap { padding: 16px 0; background: #f7f7f7; }
.cam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.cam-card {
  background: #fff;
  position: relative;
  overflow: hidden;
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid #ebebeb;
  border-radius: 0;
}
.cam-card:hover { border-color: #d0d0d0; }
.cam-card:hover .cam-thumb img,
.cam-card:hover .cam-thumb-placeholder { opacity: 0.9; }

.cam-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #eee;
}
.cam-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s ease;
}
.cam-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: #eee;
  transition: opacity 0.15s ease;
}

.cam-badges { display: none; }
.badge-live, .badge-recorded,
.badge-gender-f, .badge-gender-m,
.badge-gender-c, .badge-gender-s { display: none; }

.cam-overlay { display: none; }

.cam-info { padding: 8px 10px 10px; }
.cam-name {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #111;
}
.cam-name a { color: inherit; }
.cam-meta { display: flex; align-items: center; }
.cam-show-type { display: none; }
.cam-viewers {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  display: flex;
  align-items: center;
  gap: 4px;
}
.viewer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  flex-shrink: 0;
}

/* ─── Pager ──────────────────────────────────────────── */
.chaturbate_pager {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 1rem 0 1.5rem;
  font-size: 13px;
  color: #888;
  background: #f7f7f7;
}
.chaturbate_pager_item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 0;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
}
.chaturbate_pager_item:hover { border-color: #111; color: #111; }
.chaturbate_pager_item_current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #111;
}

/* ─── Single Cam Page ────────────────────────────────── */
.cam-page-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 16px 0;
  background: #f7f7f7;
}
.cam-page-main { flex: 1; min-width: 0; }
.cam-page-sidebar { width: 160px; flex-shrink: 0; }

.cam-embed-wrap {
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 10px;
}
.cam-embed-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.cam-performer-bar {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 0;
  padding: 12px 14px;
  margin-bottom: 0;
}
.cam-performer-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  color: #111;
}
.cam-performer-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cam-performer-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 0;
  border: 1px solid #e0e0e0;
  color: #666;
}
.cam-performer-tag.tag-live {
  background: #9333ea;
  color: #fff;
  border-color: #9333ea;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  margin-bottom: 10px;
  padding: 6px 0;
  transition: color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 44px;
}
.back-link:hover { color: #111; }

/* ─── Banner Sidebar ─────────────────────────────────── */
.banner-sidebar-desktop { display: block; }
.banner-sidebar-mobile { display: none; }

.banner-160x600 {
  width: 160px;
  height: 600px;
  background: #ebebeb;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-160x600 img { width: 160px; height: 600px; object-fit: cover; display: block; }

.banner-300x250 {
  width: 100%;
  max-width: 300px;
  height: 250px;
  background: #ebebeb;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-300x250 img { width: 300px; height: 250px; object-fit: cover; display: block; }

/* ─── Error ──────────────────────────────────────────── */
.chaturbateerror {
  background: #fff5f5;
  border-left: 3px solid #9333ea;
  padding: 12px 16px;
  font-size: 13px;
  color: #cc0000;
  border-radius: 0;
}

/* ─── SEO Block ──────────────────────────────────────── */
.seo-block {
  border-top: 1px solid #e8e8e8;
  padding: 2rem 0;
  background: #fff;
}
.seo-block h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #111;
}
.seo-block p {
  font-size: 13px;
  line-height: 1.8;
  color: #888;
  max-width: 900px;
  columns: 2;
  column-gap: 2rem;
}

/* ─── Footer ─────────────────────────────────────────── */
.site-footer {
  background: #111;
  padding: 1.25rem 0;
  margin-top: auto;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  color: #666;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer .footer-disclaimer {
  font-size: 11px;
  color: #444;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid #1f1f1f;
  margin-top: 6px;
  line-height: 1.6;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .cam-page-layout { flex-direction: column; padding: 0; gap: 0; }
  .cam-page-sidebar { width: 100%; padding: 12px 20px; }
  .banner-sidebar-desktop { display: none; }
  .banner-sidebar-mobile { display: block; }
  .cam-page-main { width: 100%; }
}

@media (max-width: 640px) {
  .main-navigation ul { display: none; }
  .main-navigation ul.is-open {
    display: flex; flex-direction: column;
    position: absolute; top: 56px; left: 0; right: 0;
    background: #111; border-bottom: 1px solid #222;
    padding: 1rem 20px; z-index: 99; gap: 1rem;
  }
  .nav-toggle { display: block; }
  .filter-pill { padding: 10px 10px; font-size: 12px; }
  .filter-bar { padding: 0; }
  .cam-grid-wrap { padding: 10px 0; }
  .cam-grid { gap: 8px; }
  .cam-embed-wrap { border-radius: 0; }
  .cam-performer-bar { border-left: none; border-right: none; padding: 12px 20px; }
  .back-link { padding: 10px 20px; margin-bottom: 0; display: flex; }
  .seo-block { padding: 1.5rem 20px; }
  .seo-block p { columns: 1; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
  body div.chaturbate_pager { flex-wrap: wrap !important; overflow-x: visible !important; gap: 4px !important; }
}

/* ─── Landscape mobile ───────────────────────────────── */
@media (max-width: 900px) and (orientation: landscape) {
  .site-header { display: none; }
  .cam-embed-wrap {
    aspect-ratio: unset !important;
    height: 100vh !important;
    width: 100vw !important;
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    z-index: 200 !important;
  }
  .cam-embed-wrap iframe { width: 100% !important; height: 100% !important; }
  .cam-page-main .back-link,
  .cam-performer-bar,
  .cam-page-sidebar { display: none !important; }
  .back-link-landscape {
    display: flex !important;
    position: fixed; top: 10px; left: 10px;
    z-index: 201;
    background: rgba(0,0,0,0.65);
    color: #fff; font-size: 11px; font-weight: 600;
    padding: 6px 12px; text-transform: uppercase; letter-spacing: 0.04em;
  }
}
@media (min-width: 901px), (orientation: portrait) {
  .back-link-landscape { display: none !important; }
}

@media (max-width: 480px) {
  .cam-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px; }
}

/* ─── WP Chaturbate Plugin Overrides ─────────────────────── */

body div.chaturbatecams,
body div[style*="clear: both"] { display: contents; }

body div.chaturbatecamitem {
  float: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  border: 1px solid #ebebeb !important;
  border-radius: 0 !important;
  background: #fff !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  color: #111 !important;
  line-height: 1.5 !important;
  overflow: hidden !important;
  position: relative !important;
  cursor: pointer;
  transition: border-color 0.15s;
}
body div.chaturbatecamitem:hover { border-color: #d0d0d0 !important; }

body div.chaturbatecamitem .cam-thumb-wrap {
  position: relative !important;
  aspect-ratio: 4/3 !important;
  overflow: hidden !important;
  display: block !important;
  background: #eee !important;
}
body div.chaturbatecamitem .cam-thumb-wrap a { display: block !important; }
body div.chaturbatecamitem img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  aspect-ratio: 4/3 !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
  transition: opacity 0.15s !important;
}
body div.chaturbatecamitem:hover img { opacity: 0.9 !important; }

/* LIVE badge — bottom right of thumb */
body div.chaturbatecamlive {
  position: absolute !important;
  bottom: 6px !important;
  right: 6px !important;
  top: auto !important;
  left: auto !important;
  background: #111 !important;
  color: #fff !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  padding: 2px 6px !important;
  border-radius: 0 !important;
  font-family: 'Inter', sans-serif !important;
  text-transform: uppercase !important;
  line-height: 1.6 !important;
}
body div.chaturbatecamlive a {
  color: #fff !important;
  text-decoration: none !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  font-family: 'Inter', sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

/* Viewer count — in info row */
body div.chaturbatecamitem .cam-viewers-thumb {
  display: none !important;
}
body div.chaturbatecamitem .cam-info {
  padding: 8px 10px 10px !important;
}
body div.chaturbatecamitem .cam-name {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #111 !important;
  margin-bottom: 3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-transform: none !important;
}
body div.chaturbatecamitem .cam-name a { color: #111 !important; }
body div.chaturbatecamitem .cam-show-type { display: none !important; }
body div.chaturbatecamitem .cam-meta {
  display: flex !important;
  align-items: center !important;
}
body div.chaturbatecamitem .cam-viewers {
  position: static !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #888 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  text-shadow: none !important;
  background: none !important;
  padding: 0 !important;
}
body div.chaturbatecamitem .viewer-dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: #22c55e !important;
  flex-shrink: 0 !important;
}

/* Popup overlay */
body div.chaturbatepopup {
  position: fixed !important;
  background: #fff !important;
  width: 90% !important;
  max-width: 900px !important;
  min-height: auto !important;
  z-index: 9002 !important;
  top: 50% !important; left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 1.5rem !important;
  border: 1px solid #ddd !important;
}
body div.chaturbateshadow {
  background-color: #000 !important;
  opacity: 0.7 !important;
  position: fixed !important;
  z-index: 9001 !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
}
body div.chaturbateclose { position: absolute !important; top: 1rem !important; right: 1rem !important; }
body div.chaturbateclose a { color: #888 !important; font-size: 12px !important; }
body div.chaturbateclose a:hover { color: #111 !important; }

body div.chaturbateerror {
  background: #fff5f5 !important;
  border: none !important;
  border-left: 3px solid #9333ea !important;
  border-radius: 0 !important;
  padding: 12px 16px !important;
  font-size: 13px !important;
  color: #cc0000 !important;
}

/* Pager */
body span.chaturbate_pager_item_current {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important; height: 32px !important;
  border-radius: 0 !important;
  background: #111 !important;
  color: #fff !important;
  font-size: 12px !important; font-weight: 700 !important;
  border: 1px solid #111 !important;
}
body a.chaturbate_pager_item {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important; height: 32px !important;
  border-radius: 0 !important;
  border: 1px solid #ddd !important;
  background: #fff !important;
  color: #666 !important;
  font-size: 12px !important;
  text-decoration: none !important;
  transition: all 0.15s !important;
}
body a.chaturbate_pager_item:hover { border-color: #111 !important; color: #111 !important; }

body div.chaturbate_pager {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
  padding: 1rem 0 1.5rem !important;
  font-size: 13px !important;
  color: #888 !important;
  float: none !important;
  width: 100% !important;
  background: #f7f7f7 !important;
  border: none !important;
  border-radius: 0 !important;
  grid-template-columns: none !important;
}

/* ─── Force cam grid ─────────────────────────────────── */
.cam-grid-wrap > div:first-child {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 12px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  float: none !important;
  width: 100% !important;
  margin-bottom: 0 !important;
}
.cam-grid-wrap > div:first-child > div[style*="clear"] { display: none !important; }

@media (max-width: 640px) {
  .cam-grid-wrap > div:first-child { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; gap: 8px !important; }
}
@media (max-width: 480px) {
  .cam-grid-wrap > div:first-child { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
}
