/**
 * VOVO Events & Fireworks - Greeting Strip Styles
 */

/* Base Strip */
.vovoef-strip {
    position: fixed;
    z-index: 9999;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Position: Top */
.vovoef-strip-top {
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 12px 50px 12px 20px;
    justify-content: center;
}

/* Position: Bottom */
.vovoef-strip-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 12px 50px 12px 20px;
    justify-content: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
}

/* Position: Left */
.vovoef-strip-left {
    top: 0;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 100vh;
    padding: 60px 0 30px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

/* Position: Right */
.vovoef-strip-right {
    top: 0;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 100vh;
    padding: 60px 0 30px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
}

/* Inner container */
.vovoef-strip-inner {
    flex: 1;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content */
.vovoef-strip-content {
    display: inline-block;
    white-space: nowrap;
}

/* ==========================================
   VERTICAL STRIPS (LEFT/RIGHT)
   Uses transform rotate (more reliable than writing-mode)
   Strip is a tall narrow column. Content rotates 90deg so it reads top-to-bottom.
   ========================================== */

.vovoef-strip-left .vovoef-strip-inner,
.vovoef-strip-right .vovoef-strip-inner {
    height: 100%;
    width: 100%;
    flex-direction: column;
    overflow: hidden;
    /* Remove flex layout temporarily for rotated content */
    display: block;
    position: relative;
}

/* Position content centered in vertical strip */
.vovoef-strip-left .vovoef-strip-content,
.vovoef-strip-right .vovoef-strip-content {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Translate to center, then rotate 90deg so text reads vertically */
    white-space: nowrap;
    display: inline-block;
    line-height: 1;
}

/* Left side: text rotates 90deg (reads bottom-to-top) */
.vovoef-strip-left .vovoef-strip-content {
    transform: translate(-50%, -50%) rotate(-90deg);
    transform-origin: center center;
}

/* Right side: text rotates -90deg (reads top-to-bottom) */
.vovoef-strip-right .vovoef-strip-content {
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
}

/* All inner elements stay nowrap for vertical strips */
.vovoef-strip-left .vovoef-strip-message,
.vovoef-strip-right .vovoef-strip-message,
.vovoef-strip-left .vovoef-strip-link,
.vovoef-strip-right .vovoef-strip-link {
    white-space: nowrap;
    display: inline-block;
}

/* Link styling */
.vovoef-strip-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s;
}

.vovoef-strip-link:hover {
    text-decoration: underline;
}

/* Hover color override - applied via CSS variables (set by JS) */
.vovoef-strip[data-hover-bg]:hover {
    background-color: var(--vovoef-hover-bg) !important;
}

.vovoef-strip[data-hover-text]:hover,
.vovoef-strip[data-hover-text]:hover .vovoef-strip-link {
    color: var(--vovoef-hover-text) !important;
}

/* Close Button */
.vovoef-strip-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: inherit;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}

.vovoef-strip-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) rotate(90deg);
}

.vovoef-strip-left .vovoef-strip-close,
.vovoef-strip-right .vovoef-strip-close {
    top: 15px;
    right: 50%;
    transform: translateX(50%);
}

.vovoef-strip-left .vovoef-strip-close:hover,
.vovoef-strip-right .vovoef-strip-close:hover {
    transform: translateX(50%) rotate(90deg);
}

/* ANIMATIONS */

/* Marquee - Continuous Mode (seamless loop with gap) */
.vovoef-marquee-wrap {
    overflow: hidden;
    width: 100%;
}

.vovoef-marquee-track-continuous {
    display: flex;
    width: max-content;
    animation: vovoefMarqueeContinuous 30s linear infinite;
}

.vovoef-marquee-track-continuous .vovoef-marquee-item {
    display: inline-block;
    padding-right: 100px;
}

@keyframes vovoefMarqueeContinuous {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Marquee - Discrete Mode (appears once, scrolls off, then reappears) */
.vovoef-marquee-track-discrete {
    display: inline-block;
    white-space: nowrap;
    animation: vovoefMarqueeDiscrete 30s linear infinite;
}

@keyframes vovoefMarqueeDiscrete {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Marquee Vertical */
.vovoef-marquee-vertical {
    height: 100%;
    width: auto;
}

.vovoef-marquee-vertical .vovoef-marquee-track-continuous {
    flex-direction: column;
    height: max-content;
    width: 100%;
    animation: vovoefMarqueeContinuousVertical 30s linear infinite;
}

.vovoef-marquee-vertical .vovoef-marquee-track-continuous .vovoef-marquee-item {
    padding-right: 0;
    padding-bottom: 100px;
    writing-mode: vertical-rl;
}

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

.vovoef-marquee-vertical .vovoef-marquee-track-discrete {
    writing-mode: vertical-rl;
    animation: vovoefMarqueeDiscreteVertical 30s linear infinite;
}

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

/* Fade animation */
@keyframes vovoefFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Rotate Messages (cycle through multiple) */
.vovoef-rotate-wrap {
    position: relative;
    width: 100%;
    min-height: 1.4em;
    line-height: 1.4;
    overflow: hidden;
}

.vovoef-rotate-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    opacity: 0;
    transition: opacity 0.6s ease;
    white-space: nowrap;
}

.vovoef-rotate-item.active {
    opacity: 1;
    position: relative; /* First active item dictates wrapper height */
}

/* For vertical strips, rotation needs adjustment */
.vovoef-strip-left .vovoef-rotate-wrap,
.vovoef-strip-right .vovoef-rotate-wrap {
    height: 100%;
    min-width: 1.4em;
    width: auto;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .vovoef-strip-top,
    .vovoef-strip-bottom {
        padding: 10px 45px 10px 15px;
        font-size: 14px !important;
    }
    
    .vovoef-strip-left,
    .vovoef-strip-right {
        width: 45px;
        padding: 45px 8px 15px;
    }
    
    .vovoef-strip-close {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
}

/* WordPress admin bar adjustment */
.admin-bar .vovoef-strip-top {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .vovoef-strip-top {
        top: 46px;
    }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .vovoef-marquee-track-continuous,
    .vovoef-marquee-track-discrete {
        animation: none !important;
    }
    
    .vovoef-strip-content {
        animation: none !important;
    }
}
