/* Synchronized Image Widget Styles */

/* Common styles */

/* Button click mode styles */
.synchronized-image-button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.7;
}

/* Button positions */
.synchronized-image-button-top-right {
    top: 20px;
    right: 20px;
}

.synchronized-image-button-top-left {
    top: 20px;
    left: 20px;
}

.synchronized-image-button-bottom-right {
    bottom: 20px;
    right: 20px;
}

.synchronized-image-button-bottom-left {
    bottom: 20px;
    left: 20px;
}

.synchronized-image-button-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.synchronized-image-button:hover {
    transform: scale(1.1);
    opacity: 1;
    background-color: #ffffff;
}

/* Center position needs special hover handling */
.synchronized-image-button-center:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.synchronized-image-button svg {
    width: 20px;
    height: 20px;
}

/* Ensure button is visible even with overlay content */
.synchronized-image .content {
    pointer-events: none;
}

.synchronized-image .content * {
    pointer-events: auto;
}

/* Common styles */
.synchronized-image-error {
    padding: 20px;
    background-color: #f8f8f8;
    border: 1px solid #eaeaea;
    border-radius: 5px;
    text-align: center;
    color: #888;
}

.synchronized-image {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
}

.synchronized-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4; /* Lower than the overlay but higher than other elements */
}

/* Full link overlay styles */
.synchronized-image-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    z-index: 5; /* Default, can be overridden by widget settings */
    transition: all 0.3s ease;
}

.synchronized-image-link:hover::before {
    background-color: rgba(0, 0, 0, 0.1);
}

.synchronized-image .image-container {
    position: relative;
    overflow: hidden;
    height: 400px;
    width: 100%;
}

/* Image overlay styles */
.synchronized-image .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none; /* Allow clicks to pass through */
}

.synchronized-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Default, can be overridden by widget settings */
    object-position: center center; /* Default, can be overridden by widget settings */
    transition: transform 0.3s ease;
}

/* Hover effect (non-parallax) */
.synchronized-image:not(.has-parallax):hover img {
    transform: scale(1.05);
}

/* Parallax specific styles - using fixed background */
.synchronized-image.has-parallax .image-container {
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.synchronized-image .content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    z-index: 3; /* Lower than the clickable overlay but higher than other elements */
}

.synchronized-image .title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.synchronized-image .description {
    font-size: 16px;
    line-height: 1.5;
}

.synchronized-image-rotation {
    position: absolute;
    top: 10px;
    font-size: 12px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 8px;
    border-radius: 3px;
    z-index: 3;
}

.synchronized-image-rotation-left {
    left: 10px;
}

.synchronized-image-rotation-right {
    right: 10px;
}

/* Admin-specific rotation indicator styles */
.synchronized-image-rotation-admin {
    margin-top: 5px;
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 3px;
    font-size: 10px;
    color: #fff;
}

.synchronized-image-rotation-admin .next-image {
    font-weight: 600;
    margin-bottom: 4px;
}

.synchronized-image-rotation-admin .transition-time {
    font-style: italic;
}

/* Responsive styles */
@media (max-width: 767px) {
    .synchronized-image .image-container {
        height: 300px;
    }

    .synchronized-image .title {
        font-size: 20px;
    }

    .synchronized-image .description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .synchronized-image .image-container {
        height: 200px;
    }

    .synchronized-image .title {
        font-size: 18px;
    }

    .synchronized-image .description {
        font-size: 12px;
    }
}
