/*
Theme Name: CoreenBeauty
Theme URI: https://coreenbeauty.com/
Author: CoreenBeauty migration
Description: Replicates the original CoreenBeauty front end. Layout and palette come from the production stylesheet recovered from the backup (assets/tailwind.css); this file only adds what Tailwind does not cover — the star rating, the lightbox overlay, and a few WordPress-specific offsets.
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coreenbeauty
Tags: dark, gallery, custom-menu
*/

/* -------------------------------------------------------------------------
   Base
   ---------------------------------------------------------------------- */
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'Noto Sans', 'Noto Sans KR', 'Noto Sans SC', sans-serif;
}

/* WordPress puts a 32px admin bar on top of a sticky header for logged-in users. */
body.admin-bar .cb-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .cb-header { top: 46px; }
}

.cb-header { position: sticky; top: 0; }

/* Hide the default WP emoji/embed cruft that would otherwise intrude. */
img.wp-smiley { display: inline; }

/* -------------------------------------------------------------------------
   Star rating (original GalleryRating)
   ---------------------------------------------------------------------- */
.cb-rating { display: flex; align-items: center; gap: .375rem; flex-shrink: 0; }

.cb-rating__stars { display: inline-flex; }

.cb-rating__star {
  background: none;
  border: 0;
  padding: 0 .5px;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  color: #4b5563; /* gray-600 */
  transition: color .15s ease, transform .15s ease;
}
.cb-rating__star:hover { transform: scale(1.15); }
.cb-rating__star.is-on { color: #facc15; } /* yellow-400 */
.cb-rating__star:disabled { cursor: default; }

.cb-rating__meta {
  font-size: .6875rem;
  color: #6b7280; /* gray-500 */
  white-space: nowrap;
}
.cb-rating__meta.is-saved { color: #f472b6; } /* pink-400 */

/* -------------------------------------------------------------------------
   Lightbox — mirrors the original yet-another-react-lightbox presentation
   ---------------------------------------------------------------------- */
.cb-lb {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .96);
}
.cb-lb.is-open { display: flex; }

.cb-lb__img {
  max-width: 94vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: .5rem;
}

.cb-lb__btn {
  position: absolute;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #e5e7eb;
  background: rgba(255, 255, 255, .08);
  border-radius: 9999px;
  transition: background .2s ease, color .2s ease;
}
.cb-lb__btn:hover { background: rgba(219, 39, 119, .85); color: #fff; }

.cb-lb__close { top: 16px; right: 16px; width: 40px; height: 40px; font-size: 20px; }
.cb-lb__prev,
.cb-lb__next { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 26px; }
.cb-lb__prev { left: 16px; }
.cb-lb__next { right: 16px; }

/* Counter sits top-left, matching counter={{ container: { top: 16, left: 16 } }} */
.cb-lb__counter {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: .875rem;
  color: #d1d5db;
}

.cb-lb__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  padding: 0 16px;
  text-align: center;
}
.cb-lb__title { font-size: .75rem; color: #d1d5db; }
.cb-lb__desc { font-size: .75rem; color: #9ca3af; margin-top: 2px; }

/* Slideshow progress: gradient matches the original (#ec4899 -> #f43f5e). */
.cb-lb__progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(to right, #ec4899, #f43f5e);
  pointer-events: none;
  z-index: 1;
}
@keyframes cb-lb-progress {
  from { width: 0; }
  to   { width: 100%; }
}
.cb-lb__progress.is-running { animation: cb-lb-progress 5000ms linear forwards; }

body.cb-lb-open { overflow: hidden; }

/* -------------------------------------------------------------------------
   Misc
   ---------------------------------------------------------------------- */
.cb-scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  color: #e5e7eb;
  background: rgba(17, 24, 39, .9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.cb-scroll-top:hover { background: #be185d; color: #fff; }
