/* ==========================================================================
   Comic shop directory (/lcs-stores).

   Depends on:
     - the --pub-* tokens in wpl-public-theme.css (light/dark)
     - the shared primitives in wpl-landing.css (.pub-shell, .pub-section,
       .pub-btn, .pub-chip, .pub-eyebrow, .pub-step)

   Namespacing: .lcs-* is this page. See the note at the top of
   wpl-public-theme.css for how --pub-*, --wpl-* and --sp-* divide up.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero. Photographic, like the landing page's — the two-layer scrim is the
   same call: fixed dark values rather than theme tokens, because the banner
   stays dark in both modes and the handoff to the page below is meant to read
   as a deliberate edge.
   -------------------------------------------------------------------------- */

.lcs-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.2rem, 4vw, 3rem);
}

.lcs-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: url('/assets/images/superman-batman-abstract-1a.jpg');
    background-size: cover;
    background-position: center 40%;
}

.lcs-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(100deg, rgba(8, 17, 28, 0.94) 0%, rgba(8, 17, 28, 0.78) 46%, rgba(8, 17, 28, 0.4) 74%, rgba(8, 17, 28, 0.58) 100%),
        linear-gradient(180deg, rgba(8, 17, 28, 0.3) 0%, rgba(8, 17, 28, 0.1) 40%, rgba(8, 17, 28, 0.8) 100%);
}

.lcs-hero-inner { max-width: 660px; }

.lcs-hero .pub-eyebrow { color: var(--pub-accent-2); }

.lcs-hero h1 {
    margin: 0 0 0.7rem;
    font-family: 'Playfair Display', Lora, Georgia, serif;
    font-size: clamp(2.1rem, 5.4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.08;
    color: #fff;
}

.lcs-hero h1 em {
    font-style: normal;
    color: var(--pub-accent-2);
}

.lcs-hero p {
    margin: 0;
    max-width: 52ch;
    font-size: clamp(0.98rem, 1.5vw, 1.1rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.84);
}

.lcs-hero-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.6rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(3px);
}

.lcs-hero-count i { color: var(--pub-accent-2); }

/* --------------------------------------------------------------------------
   "Your shop is X" banner — the state the old page never showed, so a customer
   who had already picked a shop had no way to tell from this page.
   -------------------------------------------------------------------------- */

.lcs-current {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.2rem;
    margin: 1.75rem 0 0;
    padding: 1rem 1.15rem;
    border: 1px solid var(--pub-good);
    border-radius: 14px;
    background: var(--pub-good-soft);
}

.lcs-current-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--pub-good);
    color: #fff;
}

.lcs-current-text { flex: 1 1 260px; }

.lcs-current-text strong {
    display: block;
    font-size: 0.98rem;
    color: var(--pub-ink);
}

.lcs-current-text span {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.85rem;
    color: var(--pub-ink-2);
}

.lcs-current.is-pending {
    border-color: var(--pub-accent-2);
    background: var(--pub-accent-soft);
}

.lcs-current.is-pending .lcs-current-icon { background: var(--pub-accent-2); }

/* --------------------------------------------------------------------------
   Toolbar
   -------------------------------------------------------------------------- */

.lcs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.6rem;
}

.lcs-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 260px;
    max-width: 420px;
}

.lcs-search i {
    position: absolute;
    left: 0.85rem;
    color: var(--pub-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.lcs-input,
.lcs-select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--pub-border);
    border-radius: 10px;
    background: var(--pub-surface);
    color: var(--pub-ink);
    font-size: 0.9rem;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lcs-input { padding-left: 2.3rem; }
.lcs-input::placeholder { color: var(--pub-muted); }

/* Native selects ignore the page palette in dark mode on some engines unless
   the colour-scheme is stated, which paints the popup list black on black. */
.lcs-select {
    width: auto;
    min-width: 150px;
    color-scheme: light dark;
}

.lcs-input:focus,
.lcs-select:focus {
    outline: none;
    border-color: var(--pub-accent-2);
    box-shadow: 0 0 0 3px var(--pub-accent-soft);
}

.lcs-count {
    margin: 0 0 0 auto;
    font-size: 0.88rem;
    color: var(--pub-ink-2);
}

.lcs-count strong { color: var(--pub-ink); }

/* --------------------------------------------------------------------------
   Store cards
   -------------------------------------------------------------------------- */

.lcs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.1rem;
}

.lcs-grid .lcs-card[hidden] { display: none; }

.lcs-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border: 1px solid var(--pub-border);
    border-radius: 16px;
    background: var(--pub-surface);
    box-shadow: var(--pub-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lcs-card:hover {
    transform: translateY(-3px);
    border-color: var(--pub-accent-2);
    box-shadow: var(--pub-shadow-lift);
}

@media (prefers-reduced-motion: reduce) {
    .lcs-card:hover { transform: none; }
}

/* The card for the shop you already use reads as settled rather than as one
   more option to pick from. */
.lcs-card.is-mine {
    border-color: var(--pub-good);
    box-shadow: var(--pub-shadow), inset 3px 0 0 var(--pub-good);
}

.lcs-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

/* Logos arrive at wildly different aspect ratios and often with a white
   background baked in, so they sit in a fixed light tile in both themes rather
   than floating on the card. */
.lcs-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    padding: 6px;
    border: 1px solid var(--pub-border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.lcs-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lcs-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--pub-ink);
}

.lcs-card-place {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.25rem 0 0;
    font-size: 0.84rem;
    color: var(--pub-muted);
}

.lcs-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.45rem;
}

.lcs-card-meta {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
    color: var(--pub-ink-2);
}

.lcs-card-meta li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.22rem 0;
    line-height: 1.45;
}

.lcs-card-meta i {
    margin-top: 0.2rem;
    width: 14px;
    flex-shrink: 0;
    text-align: center;
    color: var(--pub-muted);
}

.lcs-card-meta a { color: var(--pub-ink-2); text-decoration: none; }
.lcs-card-meta a:hover { color: var(--pub-accent-2); text-decoration: underline; }

.lcs-bio {
    margin: 0.85rem 0 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--pub-ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lcs-socials {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.9rem;
}

.lcs-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--pub-border);
    border-radius: 9px;
    background: var(--pub-surface-2);
    color: var(--pub-ink-2);
    font-size: 0.9rem;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.lcs-social:hover {
    border-color: var(--pub-accent-2);
    background: var(--pub-accent-soft);
    color: var(--pub-accent-2);
}

/* Actions pin to the bottom so buttons line up across a row of cards whose
   bodies carry different amounts of detail. */
.lcs-card-foot {
    margin-top: auto;
    padding-top: 1.1rem;
}

.lcs-card-foot .pub-btn { width: 100%; }

.lcs-card-foot .pub-btn[disabled] {
    opacity: 1;
    cursor: default;
    color: var(--pub-good);
    border-color: var(--pub-good);
    background: var(--pub-good-soft);
    box-shadow: none;
}

.lcs-card-foot .pub-btn[disabled]:hover { filter: none; }

.lcs-hint {
    margin: 0.55rem 0 0;
    font-size: 0.76rem;
    line-height: 1.4;
    color: var(--pub-muted);
    text-align: center;
}

/* --------------------------------------------------------------------------
   Empty states
   -------------------------------------------------------------------------- */

.lcs-empty {
    padding: 3rem 1.5rem;
    border: 1px dashed var(--pub-border);
    border-radius: 18px;
    background: var(--pub-surface);
    text-align: center;
}

.lcs-empty i { font-size: 1.8rem; color: var(--pub-muted); }

.lcs-empty h3 {
    margin: 0.9rem 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pub-ink);
}

.lcs-empty p {
    margin: 0 0 1.1rem;
    font-size: 0.9rem;
    color: var(--pub-ink-2);
}

/* --------------------------------------------------------------------------
   Referral band
   -------------------------------------------------------------------------- */

.lcs-refer {
    border-top: 1px solid var(--pub-border);
    background:
        radial-gradient(1000px 300px at 80% -20%, var(--pub-accent-soft), transparent 70%),
        var(--pub-page-2);
}

.lcs-refer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2.5rem;
}

.lcs-refer h2 {
    margin: 0 0 0.35rem;
    font-family: 'Playfair Display', Lora, Georgia, serif;
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    font-weight: 700;
    color: var(--pub-ink);
}

.lcs-refer p {
    margin: 0;
    max-width: 56ch;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--pub-ink-2);
}

/* --------------------------------------------------------------------------
   Modals. Bootstrap paints its own surfaces from --bs-* variables, which the
   public palette does not feed, so the two dialogs on this page are repainted
   from the --pub-* tokens instead of half-following the theme.
   -------------------------------------------------------------------------- */

.lcs-modal .modal-content {
    border: 1px solid var(--pub-border);
    border-radius: 16px;
    background: var(--pub-surface);
    color: var(--pub-ink);
    box-shadow: var(--pub-shadow-lift);
}

.lcs-modal .modal-header,
.lcs-modal .modal-footer { border-color: var(--pub-border); }

.lcs-modal .modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pub-ink);
}

.lcs-modal .form-label {
    margin-bottom: 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pub-ink-2);
}

.lcs-modal .form-control {
    border: 1px solid var(--pub-border);
    border-radius: 9px;
    background: var(--pub-page);
    color: var(--pub-ink);
    font-size: 0.9rem;
}

.lcs-modal .form-control:focus {
    border-color: var(--pub-accent-2);
    background: var(--pub-page);
    color: var(--pub-ink);
    box-shadow: 0 0 0 3px var(--pub-accent-soft);
}

.lcs-modal .form-control::placeholder { color: var(--pub-muted); }

.lcs-modal .btn-close { filter: var(--pub-close-filter, none); }

[data-bs-theme="dark"] .lcs-modal { --pub-close-filter: invert(1) grayscale(1) brightness(1.6); }

.lcs-modal-store {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.9rem 0 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--pub-border);
    border-radius: 12px;
    background: var(--pub-surface-2);
    font-weight: 700;
    color: var(--pub-ink);
}

/* Result line under the confirm dialog's body, for whatever the endpoint says
   back — the old page threw it into an alert(). */
.lcs-modal-note {
    margin: 0.9rem 0 0;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    font-size: 0.86rem;
    line-height: 1.5;
}

.lcs-modal-note.is-ok   { background: var(--pub-good-soft); color: var(--pub-good); }
.lcs-modal-note.is-bad  { background: var(--pub-hot-soft);  color: var(--pub-hot); }

@media (max-width: 575.98px) {
    .lcs-grid { grid-template-columns: 1fr; }
    .lcs-count { margin-left: 0; }
}
