/**
 * zoom-controls.css - Styling for Image Zoom Functionality
 * -------------------------------------------------------
 * 
 * This stylesheet provides styling for the zoom control buttons
 * and related UI elements for the product display interface.
 * 
 * Styles included:
 * - Zoom control buttons (in/out)
 * - Zoom level indicator
 * - Modal-specific zoom control positioning
 * - Transition effects for smooth zooming
 * - Responsive adjustments for different screen sizes
 * - Cursor styling for interactive elements
 * 
 * Dependencies:
 * - Works alongside zoom-controls.js
 * - Utilizes Font Awesome icons
 * 
 * Usage:
 * Include this stylesheet in the HTML head or load it dynamically via zoom-controls.js.
 * 
 * Note: Some styles are specifically designed to prevent unwanted browser/device zoom gestures and enhance the custom zoom functionality.
 * 
 * Created: March 2025
 * Version: 1.0
 * License: MIT
 */
 
 /* CSS for functional zoom buttons while preventing gesture-based zooming */

/* Zoom Control Styles */
.zoom-controls {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(46, 52, 64, 0.7);
    border: 1px solid rgba(136, 192, 208, 0.5);
    color: #e5e9f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.7;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.zoom-btn i {
    font-size: 18px;
}

.zoom-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: rgba(46, 52, 64, 0.9);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* Zoom level indicator */
.zoom-level-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(46, 52, 64, 0.9);
    color: #e5e9f0;
    padding: 8px 15px;
    border-radius: 4px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    font-weight: normal;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* Don't capture mouse events */
}

.zoom-level-indicator.visible {
    opacity: 1;
}

/* Styles for when an image is zoomable/pannable */
.carousel-slide img, #modal-image {
    transition: transform 0.2s ease-out;
    transform-origin: center center;
}

.pannable {
    cursor: grab;
}

.panning {
    cursor: grabbing !important;
}

/* Prevent text selection/highlighting which can trigger unwanted zoom */
.carousel, .carousel-slide, .carousel img, .image-modal, #modal-image {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none; /* Disable callout on iOS */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
}

/* Additional zoom prevention styles */
html, body {
    touch-action: pan-x pan-y; /* Prevent pinch zoom but allow scrolling */
    -ms-content-zooming: none; /* Prevent zooming in IE/Edge */
    -ms-touch-action: pan-x pan-y; /* Legacy touch action for older IE */
}

/* Class to be added when touch is detected to prevent unwanted behaviors */
.touch-detected {
    touch-action: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .zoom-btn {
        width: 35px;
        height: 35px;
    }
    
    .zoom-btn i {
        font-size: 16px;
    }
    
    .zoom-level-indicator {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .zoom-btn {
        width: 30px;
        height: 30px;
    }
    
    .zoom-btn i {
        font-size: 14px;
    }
}