/* assets/css/frontend.css */

/* Position variants */
.abp-popup-overlay {
    display: none !important; /* Force hide by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

/* When active, show as block (for positioned banners) */
.abp-popup-overlay.abp-active {
    display: block !important;
}

/* Center position uses flexbox when active */
.abp-popup-overlay.abp-position-center.abp-active {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

/* CRITICAL: When NOT active, always hide */
.abp-popup-overlay:not(.abp-active) {
    display: none !important;
}

/* All positioned banners */
.abp-popup-overlay.abp-position-top-left .abp-popup-container,
.abp-popup-overlay.abp-position-top-center .abp-popup-container,
.abp-popup-overlay.abp-position-top-right .abp-popup-container,
.abp-popup-overlay.abp-position-bottom-left .abp-popup-container,
.abp-popup-overlay.abp-position-bottom-center .abp-popup-container,
.abp-popup-overlay.abp-position-bottom-right .abp-popup-container {
    position: absolute;
}

.abp-popup-overlay.abp-position-top-left .abp-popup-container {
    top: 20px;
    left: 20px;
}

.abp-popup-overlay.abp-position-top-center .abp-popup-container {
    top: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.7);
}

.abp-popup-overlay.abp-position-top-center.abp-active .abp-popup-container {
    transform: translateX(-50%) scale(1);
}

.abp-popup-overlay.abp-position-top-right .abp-popup-container {
    top: 20px;
    right: 20px;
}

.abp-popup-overlay.abp-position-bottom-left .abp-popup-container {
    bottom: 20px;
    left: 20px;
}

.abp-popup-overlay.abp-position-bottom-center .abp-popup-container {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.7);
}

.abp-popup-overlay.abp-position-bottom-center.abp-active .abp-popup-container {
    transform: translateX(-50%) scale(1);
}

.abp-popup-overlay.abp-position-bottom-right .abp-popup-container {
    bottom: 20px;
    right: 20px;
}

/* Mobile adjustments for positioned banners */
@media (max-width: 768px) {
    .abp-popup-overlay.abp-position-top-left .abp-popup-container,
    .abp-popup-overlay.abp-position-top-right .abp-popup-container,
    .abp-popup-overlay.abp-position-top-center .abp-popup-container {
        top: 10px;
    }
    
    .abp-popup-overlay.abp-position-top-left .abp-popup-container {
        left: 10px;
    }
    
    .abp-popup-overlay.abp-position-top-right .abp-popup-container {
        right: 10px;
    }
    
    .abp-popup-overlay.abp-position-bottom-left .abp-popup-container,
    .abp-popup-overlay.abp-position-bottom-right .abp-popup-container,
    .abp-popup-overlay.abp-position-bottom-center .abp-popup-container {
        bottom: 10px;
    }
    
    .abp-popup-overlay.abp-position-bottom-left .abp-popup-container {
        left: 10px;
    }
    
    .abp-popup-overlay.abp-position-bottom-right .abp-popup-container {
        right: 10px;
    }
}

.abp-popup-container {
    position: relative;
    background: #fff;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.abp-popup-overlay.abp-active .abp-popup-container {
    transform: scale(1);
}

.abp-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.abp-close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

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

.abp-popup-content {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Image Content */
.abp-image-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.abp-image-content img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
    display: block;
}

.abp-clickable-image {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.abp-clickable-image img {
    transition: transform 0.3s ease;
}

.abp-clickable-image:hover img {
    transform: scale(1.02);
}

/* Video Content */
.abp-video-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.abp-video-content video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* Hide video controls completely */
.abp-video-content video::-webkit-media-controls {
    display: none !important;
}

.abp-video-content video::-webkit-media-controls-enclosure {
    display: none !important;
}

.abp-video-content video::-webkit-media-controls-panel {
    display: none !important;
}

.abp-video-content video::-webkit-media-controls-play-button {
    display: none !important;
}

.abp-video-content video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Firefox */
.abp-video-content video::-moz-media-controls {
    display: none !important;
}

/* Hover effect for clickable videos */
.abp-video-content[data-video-link]:hover video {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Text Content */
.abp-text-content {
    padding: 0;
    overflow-y: auto;
    width: 100%;
    height: 100%;
    position: relative;
}

.abp-text-inner {
    padding: 40px 30px;
    min-height: 100%;
    box-sizing: border-box;
}

.abp-text-content h1,
.abp-text-content h2,
.abp-text-content h3 {
    margin-top: 0;
}

.abp-text-content img {
    max-width: 100%;
    height: auto;
}

/* Device-specific visibility */
.abp-content-mobile {
    display: none;
}

/* Mobile styles */
@media (max-width: 768px) {
    .abp-content-desktop {
        display: none;
    }
    
    .abp-content-mobile {
        display: block;
    }
    
    .abp-popup-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .abp-text-inner {
        padding: 30px 20px;
    }
    
    .abp-close-btn {
        width: 36px;
        height: 36px;
        top: 8px;
        right: 8px;
    }
}

/* Prevent body scroll when popup is active */
body.abp-popup-active {
    overflow: hidden;
}

/* Animation classes */
@keyframes abpFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes abpZoomIn {
    from {
        transform: scale(0.7);
    }
    to {
        transform: scale(1);
    }
}

.abp-popup-overlay.abp-animate {
    animation: abpFadeIn 0.3s ease;
}

.abp-popup-overlay.abp-animate .abp-popup-container {
    animation: abpZoomIn 0.3s ease;
}

/* Text Banner Link Wrapper */
.abp-text-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.abp-text-link:hover {
    text-decoration: none;
    color: inherit;
}

/* When text banner has a link, disable pointer events on inner links */
.abp-text-link .abp-text-inner a {
    pointer-events: none;
}

/* When text banner has NO wrapper link, enable links inside */
.abp-text-content:not(:has(.abp-text-link)) .abp-text-inner a {
    pointer-events: auto;
}

/* ΠΡΟΣΘΕΣΕ αυτό στο τέλος του frontend.css */

/* Info Banner Mode - Non-intrusive notification style */
.abp-popup-overlay.abp-info-banner {
    background-color: transparent !important;
    pointer-events: none; /* Allow clicks to pass through overlay */
}

.abp-popup-overlay.abp-info-banner .abp-popup-container {
    pointer-events: auto; /* But allow clicks on the banner itself */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); /* Stronger shadow for visibility */
}

/* Don't block body scroll in info banner mode */
body.abp-popup-active.abp-info-banner-active {
    overflow: auto !important;
}

/* Info banner animations - more subtle */
.abp-popup-overlay.abp-info-banner.abp-animate .abp-popup-container {
    animation: abpSlideIn 0.4s ease;
}

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

/* Position adjustments for info banner mode */
.abp-popup-overlay.abp-info-banner.abp-position-top-left .abp-popup-container,
.abp-popup-overlay.abp-info-banner.abp-position-top-right .abp-popup-container,
.abp-popup-overlay.abp-info-banner.abp-position-top-center .abp-popup-container {
    animation: abpSlideInFromTop 0.4s ease;
}

.abp-popup-overlay.abp-info-banner.abp-position-bottom-left .abp-popup-container,
.abp-popup-overlay.abp-info-banner.abp-position-bottom-right .abp-popup-container,
.abp-popup-overlay.abp-info-banner.abp-position-bottom-center .abp-popup-container {
    animation: abpSlideInFromBottom 0.4s ease;
}

@keyframes abpSlideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes abpSlideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
