/* css/slpi-styles.css */

/* Wrapper for the image and overlays */
.slpi-image-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.slpi-image-wrapper img {
    display: block;
}

/* "View In Gallery" overlay */
.slpi-view-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 8px 16px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    border-radius: 4px;
    user-select: none; /* Prevent text selection */
    pointer-events: none; /* Allow clicks to pass through */
}

.slpi-image-wrapper:hover .slpi-view-overlay {
    opacity: 1;
}

/* Pinterest Save Button Overlay in Post Content */
.slpi-pinterest-button {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
    background-color: #E60023; /* Updated button color: Main Pinterest red */
    width: 80px;             /* Updated width */
    height: 30px;            /* Updated height */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.slpi-image-wrapper:hover .slpi-pinterest-button {
    opacity: 1;             /* Updated to full visibility on hover */
}

.slpi-pinterest-button img {
    width: 24px;            /* Adjusted icon size to fit the new container */
    height: 24px;
}

/* Customize the lightbox background color */
.fancybox-bg {
    background-color: rgba(0, 0, 0, 0.85);
}

/* Add a beautiful border around the image in the lightbox */
.fancybox-slide--image .fancybox-image-wrap {
    border: 8px solid #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Customize the close button at the top */
.fancybox-button--close {
    background: transparent;
    color: #fff;
    font-size: 28px;
}

.fancybox-button--close span {
    display: block;
    line-height: 1;
}

/* Adjust the thumbnail styling */
.fancybox-thumbs {
    background-color: rgba(0, 0, 0, 0.85);
}

.fancybox-thumbs__list a {
    border: 2px solid transparent;
}

.fancybox-thumbs__list a:hover,
.fancybox-thumbs__list a.active {
    border-color: #0073aa;
}

/* Style the caption (alt text) below the image */
.fancybox-caption {
    color: #fff;
    font-size: 14px;
    padding-top: 8px;
    text-align: center;
}

/* Style for the alt text below images in content */
.slpi-alt-text {
    margin-top: 5px;
    font-size: 13px;
    color: #333;
    text-align: center;
}

/* Style for the custom "Pin It" button in the toolbar */
.fancybox-button--pinit {
    background-color: #E60023; /* Pinterest red color */
    border: none;
    padding: 8px 14px; /* Increased padding for better width */
    margin: 0 5px; /* Spacing between buttons */
    cursor: pointer;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 16px; /* Increased font size */
    display: flex;
    align-items: center;
    justify-content: center; /* Center content horizontally */
    border-radius: 4px;
    transition: background-color 0.3s;
    white-space: nowrap; /* Prevent text from wrapping */
}

.fancybox-button--pinit:hover {
    background-color: #bd081c; /* Darker Pinterest red on hover */
}

.fancybox-pinit-icon {
    display: inline-flex;
    align-items: center;
    /* Removed margin-right to eliminate space for removed text */
}

.fancybox-pinit-icon svg {
    width: 24px; /* Increased icon size */
    height: 24px;
    fill: #fff; /* White icon */
}

.fancybox-pinit-text {
    display: none; /* Hide the "Pin It" text */
}

/* Ensure proper alignment with other toolbar buttons */
.fancybox-toolbar .fancybox-button {
    margin-left: 5px;
    margin-right: 5px;
}

/* Reorder toolbar buttons */
.fancybox-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Adjustments for mobile view */
@media (max-width: 767px) {
    .fancybox-button--pinit {
        font-size: 14px; /* Adjusted for smaller screens */
        padding: 6px 10px;
    }

    .fancybox-pinit-icon svg {
        width: 20px; /* Slightly smaller icon size for mobile */
        height: 20px;
    }

    .slpi-view-overlay {
        font-size: 14px;
        padding: 6px 12px;
    }

    .slpi-pinterest-button img {
        width: 20px;
        height: 20px;
    }
}
