/* --- Feature Spotlight Pop-up --- */

#feature-spotlight-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#feature-spotlight-popup-overlay.visible {
    display: flex;
    opacity: 1;
}

.feature-spotlight-popup-content {
    background: linear-gradient(180deg, #E4F1F8, white);
    border-radius: 12px;
    padding: 40px 40px 30px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease-in-out;
    margin-top: 20px;
}

#feature-spotlight-popup-overlay.visible .feature-spotlight-popup-content {
    transform: scale(1);
}

.feature-spotlight-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.feature-spotlight-popup-header {
    text-align: center;
    font-size: 1.9em;
    color: #3d5166;
    padding-bottom: 25px;
    margin-bottom: 15px;
    font-weight: 500;
    background-image: url(../popup_underline.svg);
    background-size: 500px;
    background-repeat: no-repeat;
    background-position: 50% bottom;
}

.feature-spotlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: white;
    border: 1px solid #cddde8;
    border-radius: 8px;
    padding: 5px 15px;
    margin: 0 10px 5px;
    font-size: 0.9em;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.feature-spotlight-badge img {
    height: 16px;
}

#feature-spotlight-carousel-container {
    position: relative;
    height: 250px; /* Define a fixed height for the viewing window */
    overflow: hidden; /* Hide slides outside the view */
    margin-bottom: 25px;
}

/* This wrapper holds all carousel items and is where the rotation transformation is applied */
.carousel-slides-wrapper {
    display: flex;
    flex-direction: column;
    transition: transform 0.7s ease-in-out; /* Smooth transition for rotation */
}

.feature-spotlight-carousel-item {
    /* Set a consistent height for each item to calculate the transform */
    flex-shrink: 0;
    height: 250px; /* Must match the container height for 1:1 rotation */
    width: 100%;
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    /* Removed opacity and visibility properties from the old approach */
}

.carousel-image {
    flex: 1;
    text-align: center;
}

.carousel-image img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 8px;
}

.carousel-text {
    flex: 1;
}

.carousel-text h3 {
    font-size: 1.6em;
    color: #3d5166;
    margin-top: 0;
    margin-bottom: 10px;
}

.carousel-text p {
    font-size: 1em;
    color: #5a7288;
    line-height: 1.6;
    margin: 0;
}

.feature-spotlight-popup-footer {
    text-align: center;
    margin-top: 25px;
}

.feature-spotlight-learn-more {
    background: #34424C;
    color: white !important;
    display: flex;
    gap: 6px;
    border-radius: 6px;
    padding: 10px 20px;
    font-family: 'Open Sans';
    font-size: 1.2em;
    font-weight: 600;
    box-shadow: 0px 0px 10px 0px #dbe3e966 !important;
    transition: 0.2s;
    justify-content: center;
    max-width: 90%;
    width: 350px;
    align-items: center;
    margin: auto;
    margin-top: 30px;
    margin-bottom: 5px;
}

.feature-spotlight-learn-more span {
	opacity: 0.6;
}

.feature-spotlight-learn-more:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 10px 0px #a3c9e2ad !important;
}

/* Responsive adjustments */

@media (max-height: 1161px) {
    .feature-spotlight-popup-content {
        max-width: 800px !important;
    }    
}

@media (max-height: 768px) {
    #feature-spotlight-carousel-container {
        margin-bottom: 0
    }
    .feature-spotlight-popup-header {
        margin-bottom: 10px    
    }
}

@media (max-width: 768px) {
    .feature-spotlight-popup-content {
        width: 85%;
    }
    .feature-spotlight-popup-header {
        font-size: 1.4em;
    }
    .feature-spotlight-carousel-item {
        flex-direction: column;
        text-align: center;
        height: 350px;
        gap: 15px;
    }
    .feature-spotlight-carousel-item img {
        height: 190px;
        
    }
    #feature-spotlight-carousel-container {
        height: 350px;
    }
    .carousel-text {
        padding-left: 0;
    }
    .carousel-text h3 {
        font-size: 1.5em;
    }

    .carousel-text p {
        width: 90%;
        margin: 0 auto;
    }
}