/**
 * MetaSlider Lightbox Pro - Public Styles
 * Combined styles for tooltips and share customizations
 */

/* ==========================================================================
   Tooltip Styles
   ========================================================================== */

/* Ensure buttons can contain positioned tooltips */
.lg-toolbar button {
    position: relative;
    border-radius: 0;
}

/* Base tooltip styles */
.lg-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background-color: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out, transform 0.25s ease-in-out;
}

/* Show tooltip on hover */
.lg-tooltip.lg-tooltip-show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip arrow pointing up to button */
.lg-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(0, 0, 0, 0.75);
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    .lg-tooltip {
        white-space: normal;
        max-width: 120px;
        text-align: center;
    }
}

/* Prevent close button tooltip from overflowing right edge on desktop and iPad */
@media screen and (min-width: 769px) {
    .lg-toolbar .lg-close .lg-tooltip {
        left: -80%;
        transform: translateX(0) translateY(-5px);
    }

    .lg-toolbar .lg-close .lg-tooltip.lg-tooltip-show {
        transform: translateX(0) translateY(0);
    }

    .lg-toolbar .lg-close .lg-tooltip::after {
        left: 75%;
        transform: translateX(-50%);
    }
}

/* Ensure tooltips work with all button types */
.lg-toolbar .lg-icon {
    position: relative;
}

/* Prevent tooltip from blocking clicks */
.lg-tooltip * {
    pointer-events: none;
}

/* Hide buttons when not in use */
.lg-single-item .lg-autoplay-button {
    display: none;
}

/* Hide actual size button when image is already at actual size */
.lg-hide-actual-size {
    display: none !important;
}

/* ==========================================================================
   Share Plugin Customizations
   ========================================================================== */

/* Base styling for all share dropdown icons */
.lg-toolbar .lg-share .lg-dropdown .lg-icon {
    background-color: transparent !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 20px;
    height: 20px;
    padding: 12px;
    border-radius: 100%;
}

/* Hide default icon fonts */
.lg-outer .lg-share-facebook .lg-icon::after,
.lg-outer .lg-share-twitter .lg-icon::after,
.lg-outer .lg-share-pinterest .lg-icon::after {
    content: none !important;
}

/* Social platform SVG icons */
.lg-outer .lg-share-facebook .lg-icon {
    background-image: url('../images/facebook.svg') !important;
    background-size: 20px !important;
}

.lg-outer .lg-share-twitter .lg-icon {
    background-image: url('../images/twitter-x.svg') !important;
    background-size: 15px !important;
    
}
.lg-toolbar .lg-share .lg-dropdown .lg-share-twitter .lg-icon {
    background-color: #000000 !important;
}

.lg-outer .lg-share-pinterest .lg-icon {
    background-image: url('../images/pinterest.svg') !important;
    background-size: 20px !important;
}

.lg-outer .lg-share-linkedin .lg-icon::after,
.lg-outer .lg-share-email .lg-icon::after,
.lg-outer .lg-share-copylink .lg-icon::after {
    content: none !important;
}

.lg-outer .lg-share-linkedin .lg-icon {
    background-image: url('../images/linkedin.svg') !important;
    background-size: 20px !important;
}

.lg-outer .lg-share-email .lg-icon {
    background-image: url('../images/email.svg') !important;
    background-size: 18px !important;
}

.lg-outer .lg-share-copylink .lg-icon {
    background-image: url('../images/copylink.svg') !important;
    background-size: 18px !important;
}

/* ==========================================================================
   Pager Plugin Customizations
   ========================================================================== */

.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont {
    opacity: 0 !important;
}

/* ==========================================================================
   Z-Index Override
   ========================================================================== */

.lg-outer,
.lg-backdrop {
    z-index: 100001 !important;
}

/* Image protection: block mobile long-press "Save Image", selection, and drag.
   pointer-events intentionally left intact so click-to-open and lightbox
   gestures keep working. */
.ml-gallery-container[data-lg-protect="1"] img,
.ml-gallery-container[data-lg-protect="1"] .ml-image-overlay,
.lg-container.ml-lg-protected .lg-image,
.lg-container.ml-lg-protected img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* Multi-size download menu. Styled like lg-share.css's dropdown but not reusing
   .lg-dropdown, whose visibility is tied to .lg-outer.lg-dropdown-active — sharing
   that state would open the Share dropdown too. */
.lg-container.ml-lg-download-sizes .ml-lg-download-menu {
    position: absolute;
    z-index: 1085;
    margin: 6px 0 0;
    padding: 6px 0;
    min-width: 180px;
    list-style: none;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.35 );
    text-align: left;
}

.lg-container.ml-lg-download-sizes .ml-lg-download-menu li {
    margin: 0;
    padding: 0;
}

.lg-container.ml-lg-download-sizes .ml-lg-download-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 14px;
    color: #333;
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}

.lg-container.ml-lg-download-sizes .ml-lg-download-option:hover,
.lg-container.ml-lg-download-sizes .ml-lg-download-option:focus {
    background-color: #f2f2f2;
    color: #000;
    outline: none;
}

.lg-container.ml-lg-download-sizes .ml-lg-download-option-dims {
    margin-left: auto;
    color: #767676;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.lg-container.ml-lg-download-sizes .ml-lg-download-option:focus-visible {
    background-color: #f2f2f2;
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

/* Lightbox like button */
.lg-container.ml-lg-likes .ml-lg-like {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    background: none;
    border: 0;
    cursor: pointer;
    color: #999;
    transition: color .2s ease;
}

.lg-container.ml-lg-likes .ml-lg-like:hover,
.lg-container.ml-lg-likes .ml-lg-like:focus {
    color: #fff;
}

.lg-container.ml-lg-likes .ml-lg-like-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.lg-container.ml-lg-likes .ml-lg-like.ml-lg-liked {
    color: #e0245e;
}

.lg-container.ml-lg-likes .ml-lg-like.ml-lg-liked .ml-lg-like-icon {
    fill: currentColor;
}

.lg-container.ml-lg-likes .ml-lg-like-count {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Photo metadata, under the lightbox caption. */
.ml-lg-photo-meta {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(128, 128, 128, 0.35);
    font-size: 0.85em;
    line-height: 1.4;
    opacity: 0.8;
}

/* The same line on a thumbnail. No rule to separate it from the caption: a tile
   is small, and the caption overlay already sits on a gradient. */
.ml-thumb-photo-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.85em;
    line-height: 1.3;
    opacity: 0.8;
}

/* ==========================================================================
   Before & After layout
   ========================================================================== */

/* No overflow:hidden here: it would clip the frame's Image Styles box-shadow. */
.ml-gallery-container.ml-layout-before-after {
    --ml-compare-pos: 50%;
    position: relative;
    direction: ltr;
    user-select: none;
    -webkit-user-select: none;
}

/* Only once the script has built a comparison is there anything to drag. */
.ml-gallery-container.ml-layout-before-after.is-comparing {
    touch-action: pan-y;
    cursor: ew-resize;
}

.ml-gallery-container.ml-layout-before-after.is-comparing[data-ml-compare-orientation="vertical"] {
    touch-action: pan-x;
    cursor: ns-resize;
}

.ml-layout-before-after > a {
    display: block;
}

/* Editor preview only: the attribute is emitted for REST renders. */
.ml-layout-before-after[data-ml-compare-empty]:not(:has(> a))::before {
    content: attr(data-ml-compare-empty);
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--ml-row-height, 220px);
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    color: #646970;
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* The gallery's Height setting sizes the comparison, as it sizes a Grid row. */
.ml-layout-before-after > a:nth-of-type(1) {
    height: var(--ml-row-height, 220px);
}

/* After sits exactly over Before; its frame shadow would double Before's. */
.ml-layout-before-after > a:nth-of-type(2) {
    position: absolute;
    inset: 0;
    box-shadow: none !important;
}

/* Both images must fill the frame exactly: the reveal is clipped against the image and
   the divider is placed against the frame, so any difference puts them out of sync.
   Themes can size attachment images inline (Twenty Twenty-One adds
   width:100%;height:<ratio>%;max-width:<width>px), which only !important beats.
   Rotate and flip would turn the clip, and so the divider, with the image. */
.ml-layout-before-after > a img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover;
    transform: none !important;
}

/* Each image shows only its own side, so a translucent one never shows the other through. */
.ml-layout-before-after > a:nth-of-type(1):not(:last-of-type) img {
    clip-path: inset(0 calc(100% - var(--ml-compare-pos)) 0 0);
}

.ml-layout-before-after > a:nth-of-type(2) img {
    clip-path: inset(0 0 0 var(--ml-compare-pos));
}

.ml-layout-before-after[data-ml-compare-orientation="vertical"] > a:nth-of-type(1):not(:last-of-type) img {
    clip-path: inset(0 0 calc(100% - var(--ml-compare-pos)) 0);
}

.ml-layout-before-after[data-ml-compare-orientation="vertical"] > a:nth-of-type(2) img {
    clip-path: inset(var(--ml-compare-pos) 0 0 0);
}

.ml-compare-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--ml-compare-pos);
    width: 2px;
    margin-left: -1px;
    background: #fff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.ml-layout-before-after[data-ml-compare-orientation="vertical"] .ml-compare-divider {
    top: var(--ml-compare-pos);
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 2px;
    margin: -1px 0 0;
}

.ml-compare-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

/* Two chevrons pointing along the drag axis. */
.ml-compare-handle::before,
.ml-compare-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border: solid #fff;
    border-width: 0 0 2px 2px;
}

.ml-compare-handle::before {
    left: 9px;
    transform: rotate(45deg);
}

.ml-compare-handle::after {
    right: 9px;
    transform: rotate(-135deg);
}

.ml-layout-before-after[data-ml-compare-orientation="vertical"] .ml-compare-handle {
    transform: rotate(90deg);
}

.ml-compare-range:focus-visible + .ml-compare-divider .ml-compare-handle {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Visually hidden, still focusable: keyboard and screen-reader control. */
.ml-compare-range {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.ml-compare-label {
    position: absolute;
    top: 12px;
    padding: 4px 10px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    pointer-events: none;
}

.ml-compare-label--before {
    left: 12px;
}

.ml-compare-label--after {
    right: 12px;
}

.ml-layout-before-after[data-ml-compare-orientation="vertical"] .ml-compare-label--after {
    top: auto;
    right: auto;
    bottom: 12px;
    left: 12px;
}

.ml-compare-fullscreen {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
}

.ml-compare-fullscreen:hover,
.ml-compare-fullscreen:focus-visible {
    background: rgba(0, 0, 0, 0.8);
}

.ml-compare-fullscreen:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Fullscreen: fill the screen with both images. Kept as separate rules — one unknown
   pseudo-class in a selector list drops the whole rule. Cover, as inline: contain would
   letterbox images of different proportions differently, so they'd no longer line up. */
.ml-layout-before-after:fullscreen {
    width: 100vw;
    height: 100vh;
    margin: 0;
    background: #000;
}

.ml-layout-before-after:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    margin: 0;
    background: #000;
}

.ml-layout-before-after:fullscreen > a:nth-of-type(1) {
    position: absolute;
    inset: 0;
    height: auto;
}

.ml-layout-before-after:-webkit-full-screen > a:nth-of-type(1) {
    position: absolute;
    inset: 0;
    height: auto;
}

.ml-layout-before-after:fullscreen > a img {
    object-fit: cover;
}

.ml-layout-before-after:-webkit-full-screen > a img {
    object-fit: cover;
}

/* Watermark. Positioned in JS against the measured image box; starts hidden so
   it never flashes at 0,0 before the first measure lands. */
.ml-lg-watermark {
    position: absolute;
    visibility: hidden;
    z-index: 20;
    pointer-events: none;
    max-width: 100%;
    height: auto;
}

/* Zoom transforms the image out from under a measured position, so step aside
   rather than drift. lg-zoom puts this class on .lg-outer. */
.lg-outer.lg-zoomed .ml-lg-watermark {
    display: none;
}

/* WooCommerce Products: variation selector in the lightbox toolbar (#125). */
/* Centred in the toolbar, clear of the counter on the left and the buttons on the right. */
.lg-toolbar .ml-lg-wc-variations {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 1;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    height: 47px;
    padding: 0 10px;
    color: #fff;
    font-size: 13px;
}

.lg-toolbar .ml-lg-wc-variations label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.lg-toolbar .ml-lg-wc-variation {
    max-width: 40vw;
    min-height: 30px;
    padding: 2px 24px 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 13px;
}

.lg-toolbar .ml-lg-wc-variation option {
    color: #000;
}

/* WooCommerce Products caption template (#125). Product captions only
   (.ml-wc-caption): image and video captions are untouched. */
.lg-sub-html .ml-wc-caption {
    line-height: 1.4;
}

.lg-sub-html .ml-wc-caption > p:first-child {
    margin-top: 0;
}

.ml-gallery-caption .ml-wc-thumb-caption {
    display: block;
}

/* [metaslider_gallery_wc_add_to_cart]: one defined button, the same in any theme,
   as MetaSlider Pro's WooCommerce slide does. Themes and WooCommerce style
   .button (and a.button, button.button, .wp-element-button) with high
   specificity, so every property that shapes it is set here, !important where a
   theme would otherwise win. Colours come from the shortcode's attributes
   (CSS variables on .ml-wc-atc), with the plugin's defaults as fallbacks. */
.ml-wc-atc {
    display: block;
    margin: 8px 0 0;
}

.ml-wc-atc .add_to_cart_inline {
    display: inline;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
}

.ml-wc-atc .button {
    display: inline-block !important;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 8px 14px !important;
    border: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    background: var(--ml-wc-atc-bg, #dd6923) !important;
    color: var(--ml-wc-atc-color, #ffffff) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-style: normal !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: none !important;
    text-shadow: none !important;
    vertical-align: middle;
    white-space: nowrap;
    cursor: pointer;
    opacity: 1;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.ml-wc-atc .button:hover,
.ml-wc-atc .button:focus,
.ml-wc-atc .button:active {
    background: var(--ml-wc-atc-bg-hover, #c45a1a) !important;
    color: var(--ml-wc-atc-color-hover, #ffffff) !important;
    text-decoration: none !important;
}

.ml-wc-atc .button:focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: 2px !important;
}

/* Themes and WooCommerce draw icons and spinners on the button's ::before and
   ::after (loading, added); drop them and show the state another way. */
.ml-wc-atc .button::before,
.ml-wc-atc .button::after {
    content: none !important;
    display: none !important;
}

.ml-wc-atc .button.loading {
    opacity: 0.6;
    cursor: wait;
}

/* The "View cart" link WooCommerce adds after an AJAX add to cart. */
.ml-wc-atc .added_to_cart {
    display: inline-block;
    margin: 0 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    text-decoration: underline !important;
    text-transform: none !important;
    vertical-align: middle;
}

.ml-wc-atc .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* [metaslider_gallery_wc_rating]: as MetaSlider Pro's WooCommerce slide draws
   it, with its own copy of the WooCommerce star font under its own name, so the
   theme's .star-rating rules (or their absence) don't change it and the theme's
   own WooCommerce stars aren't touched. */
@font-face {
    font-family: ml-wc-star;
    src: url(../fonts/WooCommerce.woff2) format("woff2"),
        url(../fonts/WooCommerce.woff) format("woff"),
        url(../fonts/WooCommerce.ttf) format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

.ml-wc-rating {
    display: flex;
    justify-content: inherit;
    margin: 6px 0;
}

.lg-sub-html .ml-wc-caption .ml-wc-rating {
    justify-content: center;
}

.ml-wc-rating .star-rating {
    display: block;
    float: none;
    overflow: hidden;
    position: relative;
    width: 5.4em;
    height: 1.1em;
    margin: 6px 0;
    font-family: ml-wc-star !important;
    font-size: 1em;
    line-height: 1;
    letter-spacing: normal;
    text-align: left;
}

.ml-wc-rating .star-rating::before {
    content: "sssss";
    position: absolute;
    top: 0;
    left: 0;
    float: left;
    color: var(--ml-wc-rating-color, #cfc8d8);
}

.ml-wc-rating .star-rating span {
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    float: left;
    padding-top: 1.5em;
}

.ml-wc-rating .star-rating span::before {
    content: "SSSSS";
    position: absolute;
    top: 0;
    left: 0;
    color: var(--ml-wc-rating-color, #ffb900);
}
