/* SEGIB Greetings Lightbox Styles - adapted from gallery lightbox */

body.no-scroll {
    overflow: hidden;
    touch-action: none;
}

/* Greetings lightbox main container */
.segib-greetings-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
    overflow: hidden;
}

.segib-greetings-lightbox[style*="display: flex"],
.segib-greetings-lightbox[style*="display:flex"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.segib-greetings-lightbox-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 30px;
    box-sizing: border-box;
    overflow: visible;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    cursor: default;
}

.segib-greetings-lightbox-container.is-grabbing {
    cursor: grabbing;
}

.segib-greetings-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    min-width: 200px;
    min-height: 150px;
    object-fit: contain;
    margin: auto;
    border: none;
    box-shadow: none;
    z-index: 3;
    position: relative;
    transition: opacity 0.3s ease;
    transform-origin: center center;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
    cursor: default;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

.segib-greetings-lightbox-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    background-color: white;
    padding: 60px 60px 60px 60px;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    text-align: left;
    z-index: 4;
    box-sizing: border-box;
}

.segib-greetings-mobile-lightbox-description {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    margin: 0;
    padding: 24px;
    background-color: white;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    text-align: left;
    z-index: 5;
    box-sizing: border-box;
}

.segib-greetings-lightbox-close {
    position: fixed;
    top: 15px;
    right: 15px;
    background-color: white;
    border-radius: 25px;
    padding: 8px 15px 8px 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
    user-select: none;
    border: none;
    outline: none;
}

.segib-greetings-lightbox-close:hover {
    transform: translateY(-2px);
}

.segib-greetings-lightbox-close span:first-child {
    font-size: 24px;
    line-height: 1;
    color: #333;
    font-weight: bold;
}

.segib-greetings-lightbox-close .close-text {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1;
}

.segib-greetings-lightbox-preloader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: none;
}

.segib-greetings-lightbox-preloader div {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: segib-greetings-lightbox-spin 1s linear infinite;
}

@keyframes segib-greetings-lightbox-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Greetings specific image hover states */
.greetings-item img[data-lightbox-enabled="true"] {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.greetings-item img[data-lightbox-enabled="true"]:hover {
    opacity: 0.8;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .segib-greetings-lightbox {
        padding: 10px;
    }
    
    .segib-greetings-lightbox-container {
        padding: 10px;
    }
    
    .segib-greetings-lightbox-close {
        top: 10px;
        right: 10px;
        padding: 6px 12px 6px 16px;
    }
    
    .segib-greetings-lightbox-close span:first-child {
        font-size: 22px;
    }
    
    .segib-greetings-lightbox-close .close-text {
        font-size: 12px;
    }
    
    .segib-greetings-lightbox-description {
        padding: 40px 20px 40px 20px;
        font-size: 14px;
    }
    
    .segib-greetings-mobile-lightbox-description {
        padding: 20px;
        font-size: 14px;
    }
    
    .segib-greetings-lightbox-image {
        max-width: calc(100% - 10px);
        max-height: calc(100% - 110px);
        min-width: 150px;
        min-height: 100px;
    }
    
    /* Touch feedback for mobile */
    .segib-greetings-lightbox::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.2);
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
        z-index: 1002;
    }
    
    .segib-greetings-lightbox.touch-active::after {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        animation: greetings-pulse 1.5s infinite;
    }
    
    @keyframes greetings-pulse {
        0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
        50% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
        100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 992px) {
    .segib-greetings-lightbox-container {
        padding: 20px;
    }
    
    .segib-greetings-lightbox-description {
        padding: 50px 40px 50px 40px;
    }
}

/* Desktop styles */
@media (min-width: 993px) {
    .segib-greetings-lightbox-container {
        padding: 30px;
    }
    
    .segib-greetings-lightbox-description {
        padding: 60px 60px 60px 60px;
    }
}

/* Hide description when empty */
.segib-greetings-lightbox-description:empty {
    display: none !important;
}

.segib-greetings-mobile-lightbox-description:empty {
    display: none !important;
}

/* Accessibility improvements */
.segib-greetings-lightbox-close:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .segib-greetings-lightbox {
        background-color: rgba(0, 0, 0, 0.9);
    }
    
    .segib-greetings-lightbox-close {
        border: 2px solid #000;
    }
    
    .segib-greetings-lightbox-description,
    .segib-greetings-mobile-lightbox-description {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .segib-greetings-lightbox-close {
        transition: none;
    }
    
    .segib-greetings-lightbox-image {
        transition: none;
    }
    
    .segib-greetings-lightbox-preloader div {
        animation: none;
    }
} 