/* ============================================
   Splash Image Popup - Frontend Styles
   Fully responsive for all devices
   ============================================ */

/* Overlay */
.sip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.4s ease;
}

.sip-overlay.sip-hidden {
    display: none;
}

.sip-overlay.sip-closing {
    opacity: 0;
    pointer-events: none;
}

/* Popup Container */
.sip-popup-container {
    position: relative;
    width: 100%;
    animation-duration: 0.5s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animations */
.sip-overlay[data-animation="fade"] .sip-popup-container {
    animation-name: sipFadeIn;
}
.sip-overlay[data-animation="zoom"] .sip-popup-container {
    animation-name: sipZoomIn;
}
.sip-overlay[data-animation="slide-down"] .sip-popup-container {
    animation-name: sipSlideDown;
}
.sip-overlay[data-animation="slide-up"] .sip-popup-container {
    animation-name: sipSlideUp;
}

@keyframes sipFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes sipZoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes sipSlideDown {
    from { opacity: 0; transform: translateY(-60px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes sipSlideUp {
    from { opacity: 0; transform: translateY(60px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Close Button */
.sip-close-btn {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.sip-close-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.sip-close-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sip-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Image */
.sip-image-wrap {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.sip-image-wrap a {
    display: block;
    line-height: 0;
}

.sip-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablets */
@media (max-width: 1024px) {
    .sip-overlay {
        padding: 16px;
    }

    .sip-popup-container {
        max-width: 90vw !important;
    }

    .sip-image {
        max-height: 80vh;
    }
}

/* Mobile Landscape & Small Tablets */
@media (max-width: 768px) {
    .sip-overlay {
        padding: 12px;
    }

    .sip-popup-container {
        max-width: 95vw !important;
    }

    .sip-close-btn {
        top: -10px;
        right: -10px;
        width: 36px;
        height: 36px;
    }

    .sip-close-btn svg {
        width: 18px;
        height: 18px;
    }

    .sip-image {
        max-height: 78vh;
    }

    .sip-image-wrap {
        border-radius: 8px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .sip-overlay {
        padding: 8px;
    }

    .sip-popup-container {
        max-width: 98vw !important;
    }

    .sip-close-btn {
        top: -8px;
        right: -8px;
        width: 32px;
        height: 32px;
    }

    .sip-close-btn svg {
        width: 16px;
        height: 16px;
    }

    .sip-image {
        max-height: 75vh;
    }

    .sip-image-wrap {
        border-radius: 6px;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .sip-image {
        max-height: 70vh;
    }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .sip-overlay {
        padding: 8px;
    }

    .sip-image {
        max-height: 85vh;
    }

    .sip-popup-container {
        max-width: 60vw !important;
    }

    .sip-close-btn {
        top: -8px;
        right: -8px;
        width: 30px;
        height: 30px;
    }

    .sip-close-btn svg {
        width: 14px;
        height: 14px;
    }
}
