/*
  Image Modal Styles
  Description: Styling for the image enlargement modal
  Author: [Your Name]
  Last updated: March 2025
  
  Features:
  - Fullscreen modal for enlarged images
  - Navigation controls
  - Close button
  - Responsive layout
  - Zoom prevention
*/

/* Modal styles for image enlargement */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.97);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: calc(85vh - 50px);
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}

.modal-image-wrapper img {
    max-width: 90vw;
    max-height: calc(85vh - 50px);
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    cursor: grab;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    transform-origin: center center;
}

/* Prevent selection highlighting */
.image-modal * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 30px;
    color: #eceff4;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal-navigation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.modal-nav-btn {
    width: 60px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

.modal-nav-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

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

.modal-nav-btn i {
    font-size: 45px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

/* Click hint in toolbar below carousel */
.click-hint {
    color: #81a1c1;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.click-hint i {
    font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-close {
        top: -35px;
        right: 0;
        font-size: 25px;
    }
    
    .modal-nav-btn {
        width: 50px;
    }
    
    .modal-nav-btn i {
        font-size: 35px;
    }
}

@media (max-width: 480px) {
    .modal-nav-btn {
        width: 40px;
    }
    
    .modal-nav-btn i {
        font-size: 30px;
    }
}