:root{color-scheme:light;}
/* Dark background on ALL REPM pages (single, grid, entry) */
body.single-repm_listing,
body:has(.repm-grid),
body:has(.repm-form){ background-color:#111827 !important; }
/* Theme wrappers transparent so dark shows through */
body.single-repm_listing .site,
body:has(.repm-grid) .site,
body:has(.repm-form) .site,
body.single-repm_listing .ast-container,
body:has(.repm-grid) .ast-container,
body:has(.repm-form) .ast-container{ background:transparent !important; }
/* Dark header + footer on all REPM pages */
body.single-repm_listing .site-header,
body.single-repm_listing .main-header-bar,
body.single-repm_listing .ast-primary-header-bar,
body.single-repm_listing .ast-mobile-header-wrap,
body.single-repm_listing .site-footer,
body.single-repm_listing .ast-footer-overlay,
body:has(.repm-grid) .site-header,
body:has(.repm-grid) .main-header-bar,
body:has(.repm-grid) .ast-primary-header-bar,
body:has(.repm-grid) .ast-mobile-header-wrap,
body:has(.repm-grid) .site-footer,
body:has(.repm-grid) .ast-footer-overlay,
body:has(.repm-form) .site-header,
body:has(.repm-form) .main-header-bar,
body:has(.repm-form) .ast-primary-header-bar,
body:has(.repm-form) .ast-mobile-header-wrap,
body:has(.repm-form) .site-footer,
body:has(.repm-form) .ast-footer-overlay{
  background-color:#111827 !important;
  box-shadow:none !important;
  border-color:transparent !important;
}
/* Make nav/footer text white on dark */
body.single-repm_listing .site-header a,
body:has(.repm-grid) .site-header a,
body:has(.repm-form) .site-header a,
body.single-repm_listing .site-footer,
body:has(.repm-grid) .site-footer,
body:has(.repm-form) .site-footer,
body.single-repm_listing .site-footer a,
body:has(.repm-grid) .site-footer a,
body:has(.repm-form) .site-footer a{ color:#ffffff !important; }
/* Menu hover */
body.single-repm_listing .main-header-menu > .menu-item > a:hover,
body:has(.repm-grid) .main-header-menu > .menu-item > a:hover,
body:has(.repm-form) .main-header-menu > .menu-item > a:hover{ color:#93c5fd !important; }

/* Make the page titles stand out in white on grid/entry pages */
body:has(.repm-grid) .entry-title,
body:has(.repm-form) .entry-title,
body:has(.repm-grid) .page-title,
body:has(.repm-form) .page-title,
body:has(.repm-grid) h1.wp-block-heading,
body:has(.repm-form) h1.wp-block-heading{ color:#ffffff !important; }

/* Content area spacing */
.repm-grid,.repm-form,.repm-single-wrap{padding-top:16px;padding-bottom:24px}

/* Cards/forms stay white for readability */
.repm-card,.repm-form{background:#ffffff}

/* If theme forces content bg, keep transparent on dark pages */
body.single-repm_listing .entry-content,
body:has(.repm-grid) .entry-content,
body:has(.repm-form) .entry-content{ background:transparent !important; }

/* Component styles */
.repm-form{border:1px solid #e5e7eb;padding:16px;border-radius:12px;max-width:1100px;margin:12px auto}
.repm-field{margin-bottom:12px}
.repm-field.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.repm-form label{font-weight:600;color:#0ea5e9}
.repm-form input[type=text],.repm-form input[type=url],.repm-form input[type=number],.repm-form textarea{width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:10px}
.repm-btn{display:inline-block;padding:10px 14px;border-radius:9999px;background:#0ea5e9;color:#fff;text-decoration:none;border:none;cursor:pointer}
.repm-btn.outline{background:transparent;color:#0ea5e9;border:2px solid #0ea5e9}
.repm-credit{font-style:italic;color:#e5e7eb;margin-top:10px}

.repm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.repm-card{border:1px solid #e5e7eb;border-radius:16px;overflow:hidden;background:#fff;display:flex;flex-direction:column}
.repm-thumb img,.repm-thumb--placeholder{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:#1f2937;text-align:center;line-height:1;padding:24px;color:#94a3b8}
.repm-card-body{padding:12px;display:flex;flex-direction:column;gap:8px}
.repm-title{margin:0 0 4px 0;font-size:1.1rem}
.repm-excerpt{color:#cbd5e1} /* lighter excerpt on dark surroundings */
.repm-actions{display:flex;gap:8px;flex-wrap:wrap}

/* Meta line */
.repm-meta-line{font-size:.9rem;color:#94a3b8;text-align:center;margin-top:4px}
.repm-meta-line.center{text-align:center}
.repm-single-meta{display:flex;gap:10px;align-items:center;justify-content:center;margin:10px 0 16px 0}

/* Gallery grid */
.repm-gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;margin-top:12px}

/* Notices */
.repm-notice{padding:10px 12px;border-radius:10px;margin-bottom:12px}
.repm-notice.repm-success{background:#ecfeff;border:1px solid #06b6d4;color:#155e75}
.repm-notice.repm-error{background:#fff7ed;border:1px solid #f97316;color:#7c2d12}

/* Pagination */
.repm-pagination{text-align:center;margin-top:20px}
.repm-pagination ul{display:inline-flex;gap:8px;list-style:none;padding:0}

/* Upload previews */
.repm-preview{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.repm-preview img{width:100px;height:100px;object-fit:cover;border-radius:10px;border:1px solid #e2e8f0}
