/* =============================================================
   Custom Logo Carousel — Front-End Styles
   File: assets/css/logo-carousel.css

   CSS Custom Properties (set per-instance via inline <style>
   generated by the shortcode, and globally via :root defaults):
     --lc-nav-color        Arrow button fill colour
     --lc-nav-hover-color  Arrow button hover colour
     --lc-nav-size         Arrow button diameter
     --lc-img-height       Image container height
     --lc-img-max          Max-height of <img> tag
     --lc-img-radius       Corner radius (Rounded shape only)
     --lc-dot-color        Active pagination dot colour
============================================================= */

/* ── Hardcoded fallback values — overridden at runtime by
   wp_add_inline_style() from saved global settings, and
   again per-instance by the shortcode's inline <style> block. */
:root {
    --lc-nav-color      : #0073aa;
    --lc-nav-hover-color: #005177;
    --lc-nav-size       : 34px;
    --lc-img-height     : 90px;
    --lc-img-max        : 80px;
    --lc-img-radius     : 8px;
    --lc-dot-color      : #0073aa;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.lc-carousel-wrapper {
    width: 100%;
    padding: 20px 0;
    box-sizing: border-box;
}

/* ── Single slide item ───────────────────────────────────── */
.lc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    text-align: center;
    transition: transform 0.25s ease;
}

.lc-item:hover {
    transform: translateY(-4px);
}

/* ── Anchor wrapper ──────────────────────────────────────── */
.lc-item-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* ── Logo image container ────────────────────────────────── */
/* Height, padding, border-radius, overflow are applied via
   inline style="" in the PHP shortcode output, so the global
   settings and per-instance values always take effect.
   These rules handle only what inline styles don't set. */
.lc-logo-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.lc-logo-image img {
    display: block;
    /* Shape-specific object-fit / width / height are set by
       the inline style attribute output from PHP. */
    transition: filter 0.3s ease;
    filter: grayscale(100%) opacity(0.65);
}

.lc-item:hover .lc-logo-image img,
.lc-item-link:focus .lc-logo-image img {
    filter: grayscale(0%) opacity(1);
}

/* When grayscale="false" — JS adds .lc-no-grayscale to the wrapper */
.lc-no-grayscale .lc-logo-image img {
    filter: none !important;
    opacity: 1;
}
.lc-no-grayscale .lc-item:hover .lc-logo-image img,
.lc-no-grayscale .lc-item-link:focus .lc-logo-image img {
    filter: none !important;
}

/* ── Image shapes — visual extras only ─────────────────────
   The actual height, width, border-radius and overflow are
   applied by PHP as inline style attributes (highest CSS
   specificity). These rules only add hover effects etc. */

/* No extra rules needed for square — base handles it. */

/* Rounded: subtle box-shadow on hover */
.lc-shape-rounded .lc-item:hover .lc-logo-image {
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    transition: box-shadow 0.25s ease;
}

/* Circle: shadow on hover */
.lc-shape-circle .lc-logo-image {
    /* Visual hint: shrink slightly on hover */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.lc-shape-circle .lc-item:hover .lc-logo-image {
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
    transform: scale(1.04);
}

/* ── Placeholder when no featured image ─────────────────── */
.lc-no-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #555;
    font-size: 28px;
    font-weight: 700;
    line-height: 70px;
    text-align: center;
    text-transform: uppercase;
    user-select: none;
}

/* ── Logo title label ────────────────────────────────────── */
.lc-logo-title {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.4;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
}

.lc-item:hover .lc-logo-title,
.lc-item-link:focus .lc-logo-title {
    color: #0073aa; /* WordPress blue; override to match your theme */
}

/* ── Owl dots ────────────────────────────────────────────── */
/* Exact colors injected by per-instance <style> block (PHP) with #id
   selectors — that rule always wins over Owl's class-only specificity. */
.lc-carousel-wrapper .owl-dots {
    margin-top: 14px;
    text-align: center;
}

.lc-carousel-wrapper .owl-dot {
    display: inline-block;
    margin: 0 3px;
}

.lc-carousel-wrapper .owl-dot span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc !important;          /* fallback; #id rule from PHP overrides */
    transition: background 0.2s ease, transform 0.2s ease;
}

.lc-carousel-wrapper .owl-dot.active span,
.lc-carousel-wrapper .owl-dot:hover span {
    background: #0073aa !important;       /* fallback; #id rule from PHP overrides */
    transform: scale( 1.2 );
}

/* ── Owl nav arrows ──────────────────────────────────────── */
/* Size / colour / hover injected by per-instance <style> block (PHP). */
.lc-carousel-wrapper .owl-nav {
    text-align: center;
    margin-top: 10px;
}

.lc-carousel-wrapper .owl-nav button.owl-prev,
.lc-carousel-wrapper .owl-nav button.owl-next {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    color: #fff !important;
    background: #0073aa !important;       /* fallback; #id rule from PHP overrides */
    cursor: pointer;
    padding: 0 !important;
    transition: background 0.2s ease, transform 0.15s ease;
}

.lc-carousel-wrapper .owl-nav button.owl-prev:hover,
.lc-carousel-wrapper .owl-nav button.owl-next:hover {
    background: #005177 !important;       /* fallback; #id rule from PHP overrides */
    filter: none;
    transform: scale( 1.08 );
}

/* ── No logos notice ─────────────────────────────────────── */
.lc-no-logos {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px 0;
}

/* ── Responsive — only typography/spacing adjustments needed ──
   Image sizes are driven by CSS custom properties (--lc-img-height,
   --lc-img-max) set per shortcode instance, so no override here. */
@media ( max-width: 768px ) {
    .lc-logo-title {
        font-size: 12px;
    }
}

@media ( max-width: 480px ) {
    .lc-logo-title {
        font-size: 11px;
    }
}
