/**
 * Module: wpnotificationbar
 * Path: /views/css/front.css
 * 
 * Styles for the front-office notification bar
 * 
 * @author      WebPoint
 * @copyright   2025 WebPoint
 * @license     GPL-3.0-or-later
 */

.wp-notification-bar {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

/* Position variations */
.wp-notification-top {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.wp-notification-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
}

.wp-notification-left {
    position: fixed;
    top: 50%;
    left: 0;
    width: 40px;
    height: auto;
    max-height: 300px;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    z-index: 9999;
}

.wp-notification-right {
    position: fixed;
    top: 50%;
    right: 0;
    width: 40px;
    height: auto;
    max-height: 300px;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center;
    z-index: 9999;
}

/* Sticky behavior */
.wp-notification-sticky {
    position: fixed !important;
}

.wp-notification-sticky.wp-notification-top {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

/* Content styling */
.wp-notification-content {
    padding: 0 30px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image styles */
.wp-notification-with-image {
    display: flex;
    align-items: center;
}

.wp-notification-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-notification-image img {
    max-width: 100%;
    height: auto;
}

.wp-image-left {
    flex-direction: row;
}

.wp-image-left .wp-notification-image {
    margin-right: 15px;
}

.wp-image-right {
    flex-direction: row-reverse;
}

.wp-image-right .wp-notification-image {
    margin-left: 15px;
}

.wp-image-center {
    flex-direction: column;
}

.wp-image-center .wp-notification-image {
    margin-bottom: 5px;
}

.wp-notification-text {
    flex: 1;
}

/* Link styling */
.wp-notification-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
    color: inherit !important;
}

/* Force text color inheritance */
.wp-notification-bar * {
    color: inherit !important;
}

/* Close button */
.wp-notification-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    z-index: 10;
}

.wp-notification-left .wp-notification-close,
.wp-notification-right .wp-notification-close {
    transform: translateY(-50%) rotate(90deg);
}

/* Countdown styling */
.wp-notification-countdown {
    margin-left: 10px;
    font-weight: bold;
}

/* Visibility states */
.wp-notification-visible {
    display: flex;
}

.wp-notification-hidden {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .wp-notification-hide-mobile {
        display: none !important;
    }
    
    .wp-notification-bar {
        font-size: 12px;
    }
    
    .wp-notification-content {
        padding: 0 25px;
    }
    
    /* Adjust image display on mobile */
    .wp-image-left,
    .wp-image-right {
        flex-direction: column;
    }
    
    .wp-image-left .wp-notification-image,
    .wp-image-right .wp-notification-image {
        margin: 0 0 5px 0;
    }
    
    .wp-notification-image img {
        max-height: 30px;
    }
    
    /* Disable side bars on mobile */
    .wp-notification-left,
    .wp-notification-right {
        width: 100%;
        height: auto;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        writing-mode: horizontal-tb;
        transform: none;
    }
}

/* Visibility states */
.wp-notification-bar {
    display: none;
}

.wp-notification-visible {
    display: flex !important;
}

.wp-notification-hidden {
    display: none !important;
}

/* Animations */
.wp-animation-fade {
    opacity: 0;
    animation: wpFadeIn 0.5s ease-in-out forwards;
}

.wp-animation-slide {
    animation: wpSlideDown 0.5s ease-in-out;
}

.wp-animation-bounce {
    animation: wpBounce 0.5s ease-in-out;
}

.wp-animation-pulse {
    animation: wpPulse 1.5s infinite;
}

.wp-animation-shake {
    animation: wpShake 0.5s;
}

.wp-animation-flip {
    animation: wpFlip 0.5s;
}

@keyframes wpFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes wpSlideDown {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes wpBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes wpPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes wpShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes wpFlip {
    0% { transform: perspective(400px) rotateX(90deg); opacity: 0; }
    40% { transform: perspective(400px) rotateX(-10deg); }
    70% { transform: perspective(400px) rotateX(10deg); }
    100% { transform: perspective(400px) rotateX(0deg); opacity: 1; }
}

/* Carousel rotation */
.wp-notification-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.wp-notification-carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.wp-notification-carousel-item {
    flex: 0 0 100%;
    width: 100%;
}

/* Carousel navigation */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.4);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* Make sure fade-in animation works for preview */
.wpnotificationbar-fade-in {
    animation: wpFadeIn 0.5s ease-in-out;
}
