/**
 * Wonder Flow Banner Styles
 */

/* Container base - hidden by default, shown via JS */
#wonderflow-banner-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    box-sizing: border-box;
    z-index: 999990;
    display: none;
    visibility: hidden;
}

#wonderflow-banner-container *,
#wonderflow-banner-container *::before,
#wonderflow-banner-container *::after {
    box-sizing: border-box;
}

/* Position: Bottom Fixed */
#wonderflow-banner-container.wonderflow-position-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease-out, visibility 0s linear 0.3s;
}

#wonderflow-banner-container.wonderflow-position-bottom.wonderflow-visible {
    transform: translateY(0);
    transition: transform 0.3s ease-out, visibility 0s linear 0s;
}

/* Position: Inline (after content) */
#wonderflow-banner-container.wonderflow-position-inline {
    position: relative;
    margin: 30px auto;
    max-width: 800px;
    padding: 0 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

#wonderflow-banner-container.wonderflow-position-inline.wonderflow-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}

/* Position: Left Fixed */
#wonderflow-banner-container.wonderflow-position-left {
    position: fixed;
    left: 20px;
    bottom: 20px;
    max-width: 350px;
    transform: translateX(-120%);
    transition: transform 0.3s ease-out, visibility 0s linear 0.3s;
}

#wonderflow-banner-container.wonderflow-position-left.wonderflow-visible {
    transform: translateX(0);
    transition: transform 0.3s ease-out, visibility 0s linear 0s;
}

/* Position: Right Fixed */
#wonderflow-banner-container.wonderflow-position-right {
    position: fixed;
    right: 20px;
    bottom: 20px;
    max-width: 350px;
    transform: translateX(120%);
    transition: transform 0.3s ease-out, visibility 0s linear 0.3s;
}

#wonderflow-banner-container.wonderflow-position-right.wonderflow-visible {
    transform: translateX(0);
    transition: transform 0.3s ease-out, visibility 0s linear 0s;
}

/* Banner base */
.wonderflow-banner {
    background: #ffffff;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15);
    position: relative;
}

#wonderflow-banner-container.wonderflow-position-left .wonderflow-banner,
#wonderflow-banner-container.wonderflow-position-right .wonderflow-banner {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Close button */
.wonderflow-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
    padding: 0;
}

.wonderflow-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

/* Label */
.wonderflow-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    padding: 12px 20px 0;
}

/* Link */
.wonderflow-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.wonderflow-link:hover {
    text-decoration: none;
}

/* ==================== COMPACT SIZE ==================== */

.wonderflow-compact {
    padding: 12px 50px 12px 15px;
}

.wonderflow-compact .wonderflow-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wonderflow-compact .wonderflow-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.wonderflow-compact .wonderflow-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.wonderflow-compact .wonderflow-link:hover .wonderflow-title {
    color: #0066cc;
}

/* ==================== STANDARD SIZE ==================== */

.wonderflow-standard {
    padding: 15px 20px 20px;
}

.wonderflow-standard .wonderflow-link {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.wonderflow-standard .wonderflow-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.wonderflow-standard .wonderflow-content {
    flex: 1;
    min-width: 0;
}

.wonderflow-standard .wonderflow-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px;
    line-height: 1.3;
}

.wonderflow-standard .wonderflow-link:hover .wonderflow-title {
    color: #0066cc;
}

.wonderflow-standard .wonderflow-excerpt {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* ==================== LARGE SIZE ==================== */

.wonderflow-large {
    padding: 15px 20px 25px;
}

.wonderflow-large .wonderflow-link {
    display: block;
    margin-top: 10px;
}

.wonderflow-large .wonderflow-image-large {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.wonderflow-large .wonderflow-content {
    padding: 0 5px;
}

.wonderflow-large .wonderflow-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.3;
}

.wonderflow-large .wonderflow-link:hover .wonderflow-title {
    color: #0066cc;
}

.wonderflow-large .wonderflow-excerpt {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px;
    line-height: 1.5;
}

.wonderflow-large .wonderflow-cta {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #0066cc;
}

.wonderflow-large .wonderflow-link:hover .wonderflow-cta {
    text-decoration: underline;
}

/* ==================== SIDE POSITIONS ==================== */

#wonderflow-banner-container.wonderflow-position-left .wonderflow-standard,
#wonderflow-banner-container.wonderflow-position-right .wonderflow-standard {
    padding: 15px;
}

#wonderflow-banner-container.wonderflow-position-left .wonderflow-standard .wonderflow-link,
#wonderflow-banner-container.wonderflow-position-right .wonderflow-standard .wonderflow-link {
    flex-direction: column;
}

#wonderflow-banner-container.wonderflow-position-left .wonderflow-standard .wonderflow-image,
#wonderflow-banner-container.wonderflow-position-right .wonderflow-standard .wonderflow-image {
    width: 100%;
    height: 120px;
}

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

@media (max-width: 768px) {
    #wonderflow-banner-container.wonderflow-position-left,
    #wonderflow-banner-container.wonderflow-position-right {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }

    .wonderflow-standard .wonderflow-link {
        flex-direction: column;
    }

    .wonderflow-standard .wonderflow-image {
        width: 100%;
        height: 150px;
    }

    .wonderflow-large .wonderflow-image-large {
        height: 150px;
    }

    .wonderflow-large .wonderflow-title {
        font-size: 18px;
    }

    .wonderflow-close {
        top: 8px;
        right: 8px;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */

@media (prefers-color-scheme: dark) {
    .wonderflow-banner {
        background: #1e1e1e;
    }

    .wonderflow-label {
        color: #aaa;
    }

    .wonderflow-compact .wonderflow-title,
    .wonderflow-standard .wonderflow-title,
    .wonderflow-large .wonderflow-title {
        color: #eee;
    }

    .wonderflow-standard .wonderflow-excerpt,
    .wonderflow-large .wonderflow-excerpt {
        color: #aaa;
    }

    .wonderflow-close {
        background: rgba(255, 255, 255, 0.1);
        color: #aaa;
    }

    .wonderflow-close:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }
}
