/**
 * 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;
}
