/* Everhexa Visual Story - Frontend Styles */

/* 1. Launcher Thumbnail (Trigger) */
.eh-storytime--launcher {
    cursor: pointer;
    position: relative;
    border-radius: 0.625em;
    box-shadow: 0 0 0.9375em rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    background: #000;
}

.eh-storytime--launcher:hover {
    background-color: var(--global-palette-btn-bg-hover);
}

.eh-storytime--label {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    margin: 0;
    padding: 5px;
    text-align: center;
    font-size: 14px;
}
.highlight {
    color: #f76a0c !important;
}

/* Mobile Optimization (< 768px) */
@media (max-width: 767px) {
    .eh-banner-wrap {
        display: flex;
        flex-direction: column; /* Stack image on top of text */
        gap: 20px;
        padding: 12px;
        text-align: center; /* Center content for better mobile balance */
    }

    .eh-banner-wrap img {
        width: 100%;
        height: auto;
        border-radius: 12px;
    }

    .eh-banner-wrap .eh-banner-heading {
        font-size: 1.5em;
        margin-top: 12px;
        line-height: 1.2;
    }

    .eh-banner-wrap .eh-banner-tag {
        background-color: #6e5ae2;
        color: white;
        display: inline-block; /* Keep it centered */
        font-size: 0.9em;
        padding: 6px 14px;
        border-radius: 25px;
    }

    .eh-banner-wrap .eh-banner-sub {
        font-size: 1.1em;
        margin-top: 8px;
        margin-bottom: 15px;
    }

    .eh-banner-wrap .eh-banner-btn {
        width: 100%; /* Thumb-friendly full-width button */
        justify-content: center;
        margin-top: 24px !important;
    }
}

/* Tablets + Desktop Optimization for Banner View */

@media (min-width: 768px) {

    .eh-banner-wrap {

        display: grid;
        grid-template-columns: 1fr 1.5fr;
        gap: 32px;
        padding: 16px;

    }

    .eh-banner-wrap img {
        border-radius: 12px;
    }

    .eh-banner-wrap .eh-banner-heading {
        margin-bottom: 0;
        margin-top: 8px;
        font-size: 1.8em;
    }

    .eh-banner-wrap .eh-banner-tag {
        background-color: #6e5ae2;
        color: white;
        padding: 8px 16px;
        border-radius: 25px;
    }

    .eh-banner-wrap .eh-banner-sub {
        font-weight: bold;
        margin-top: 8px;
        font-size: 1.2em;
        margin-bottom: 0px;
    }
    .eh-banner-wrap .eh-banner-btn {
        margin-top: 24px !important;
    }

    .button.eh-storytime--playbutton {
        margin-left: 16px;
    }
}

/* 2. Lightbox / Modal Overlay */
.eh-storytime--modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.eh-storytime--modal.is-active {
    display: flex;
}
.eh-storytime--launcher:not(.is-locked) img.eh-premium-badge{
    display: none;
}
.eh-main-thumbnail{ 
    border-radius: 16px;
}

/* 3. The Cinematic Container (Your 16:9 Logic) */
.eh-storytime--container {
    position: relative;
    width: 90vw;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    background-color: #f3f3f3;
    border-radius: 0.625em;
    overflow: hidden;
    box-shadow: 0 0 0.9375em rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.eh-storytime--image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease-in-out;
    opacity: 1;
}

.eh-storytime--image-wrapper img.fade-out {
    opacity: 0;
}

/* 4. Your Circular Arrow Buttons */
.eh-storytime--nav {
    position: absolute;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background-color: #c4e61a;
    /* Vibrant yellow-green */
    border: 3px solid #6c7d0d;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease-in-out;
}

.eh-storytime--nav:hover {
    background-color: #d8ff2a;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
}

.eh-storytime--prev {
    left: 20px;
}

.eh-storytime--next {
    right: 20px;
}

.eh-storytime--nav i {
    color: black !important;
    font-size: 24px;
    font-weight: 900;
}

/* 5. Counter & Close */
.eh-storytime--counter {
    position: absolute;
    bottom: 0.625em;
    right: 0.625em;
    font-size: 1em;
    color: #444;
    background-color: rgba(255, 255, 255, 0.6);
    padding: 0.3em 0.6em;
    border-radius: 0.3125em;
    pointer-events: none;
}

.eh-storytime--close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 100;
}

/* Responsive Scaling (Your Media Queries) */
@media (max-width: 1024px) {
    .eh-storytime--container {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .eh-storytime--container {
        font-size: 10px;
        width: 95vw;
    }
}

@media (max-width: 480px) {
    .eh-storytime--container {
        font-size: 7px;
    }
}

.eh-storytime--launcher {
    background-color: var(--global-palette-btn-bg);
    width: unset;
    border-radius: 25px;
    box-shadow: none;
}

/* The Premium Badge Overlay */
.eh-premium-badge {
    position: absolute;
    top: -32px;
    left: -32px;
    width: 80px;
    /* Adjust based on your preferred size */
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Locked State styling */
.eh-storytime--launcher.is-locked {
    cursor: default;
}

.eh-locked-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.storytime__titlearea {
    display: flex !important;
    padding-top: 24px !important;
    gap: 16px !important;
    justify-content: center;
}
@media screen and (max-width: 767px) {
    .storytime__titlearea {
        flex-wrap: wrap;
        gap: 0 !important;
    }
}


.eh-storytime--title {

    font-size: 2em !important;

}

.eh-storytime--playbutton {
    padding: 8px 24px !important;
    max-height: 50px !important;
}

.eh-storytime--playbutton span {

    vertical-align: sub !important;
    padding-left: 8px !important;

}