/* STW FAQ Video Image Text Plugin - Frontend Styles */
/* Prefixed selectors for isolation - prevents conflicts with other plugins */

.stw-fvit-container {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
}

.stw-fvit-container *,
.stw-fvit-container *::before,
.stw-fvit-container *::after {
    box-sizing: border-box;
}

/* Media Section */
.stw-fvit-media-section {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stw-fvit-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
}

.stw-fvit-video-wrapper iframe,
.stw-fvit-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.stw-fvit-mp4 video {
    object-fit: cover;
}

/* Gallery Styles */
.stw-fvit-gallery-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
    background: #f0f0f0;
}

.stw-fvit-gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.stw-fvit-gallery-image.stw-fvit-gallery-active {
    opacity: 1;
}

.stw-fvit-gallery-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.stw-fvit-gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.stw-fvit-gallery-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.stw-fvit-gallery-dot.stw-fvit-dot-active {
    background: #fff;
    transform: scale(1.2);
}

/* Accordion Section */
.stw-fvit-accordion-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.stw-fvit-accordion-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.stw-fvit-accordion-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stw-fvit-question {
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: all 0.3s ease;
    user-select: none;
}

.stw-fvit-question:hover {
    filter: brightness(1.05);
}

.stw-fvit-question-text {
    flex: 1;
    padding-right: 15px;
}

.stw-fvit-toggle-icon {
    font-size: 24px;
    font-weight: 300;
    transition: transform 0.3s ease;
    min-width: 24px;
    text-align: center;
}

.stw-fvit-question.stw-fvit-active .stw-fvit-toggle-icon {
    transform: rotate(45deg);
}

.stw-fvit-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    padding: 0 24px;
    line-height: 1.7;
}

.stw-fvit-answer.stw-fvit-answer-open {
    max-height: 2000px;
    padding: 20px 24px;
    opacity: 1;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Animations */
.stw-fvit-answer.stw-fvit-answer-open.stw-fvit-bounce-in {
    animation: stwFvitBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.stw-fvit-answer.stw-fvit-answer-open.stw-fvit-fade-in {
    animation: stwFvitFadeIn 0.5s ease-in-out;
}

.stw-fvit-answer.stw-fvit-answer-open.stw-fvit-slide-down {
    animation: stwFvitSlideDown 0.4s ease-out;
}

.stw-fvit-answer.stw-fvit-answer-open.stw-fvit-ease-in {
    animation: stwFvitEaseIn 0.4s ease-in;
}

@keyframes stwFvitBounceIn {
    0% { opacity: 0; transform: scale(0.95) translateY(-10px); }
    50% { opacity: 0.8; transform: scale(1.02) translateY(-3px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

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

@keyframes stwFvitSlideDown {
    0% { opacity: 0; transform: translateY(-15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes stwFvitEaseIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* FAQ Answer Layout */
.stw-fvit-answer-text {
    line-height: 1.7;
}

/* FAQ Media Container - Centered */
.stw-fvit-faq-media-container {
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.stw-fvit-faq-media-container:empty {
    display: none;
}

.stw-fvit-faq-media-container .stw-fvit-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 15px auto;
    padding-bottom: 0;
    height: auto;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
}

.stw-fvit-faq-media-container .stw-fvit-video-wrapper iframe,
.stw-fvit-faq-media-container .stw-fvit-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stw-fvit-faq-media-container .stw-fvit-gallery-wrapper {
    max-width: 600px;
    height: 400px;
    margin: 0 auto 15px auto;
    border-radius: 8px;
}

/* Answer Content Styling */
.stw-fvit-answer p {
    margin: 0 0 12px 0;
}

.stw-fvit-answer p:last-child {
    margin-bottom: 0;
}

.stw-fvit-answer ul,
.stw-fvit-answer ol {
    margin: 0 0 12px 20px;
    padding: 0;
}

.stw-fvit-answer li {
    margin-bottom: 6px;
}

.stw-fvit-answer a {
    color: inherit;
    text-decoration: underline;
}

.stw-fvit-answer a:hover {
    opacity: 0.8;
}

/* Error and Empty States */
.stw-fvit-error {
    padding: 20px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c00;
    text-align: center;
}

.stw-fvit-no-faqs {
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stw-fvit-question {
        padding: 15px 18px;
        font-size: 15px;
    }
    
    .stw-fvit-answer.stw-fvit-answer-open {
        padding: 15px 18px;
    }
    
    .stw-fvit-faq-media-container {
        max-width: 100%;
    }
    
    .stw-fvit-faq-media-container .stw-fvit-video-wrapper {
        max-width: 285px;
        margin: 0 auto 15px auto;
    }
    
    .stw-fvit-faq-media-container .stw-fvit-gallery-wrapper {
        max-width: 85%;
        margin: 0 auto 15px auto;
        height: 250px;
    }
    
    .stw-fvit-toggle-icon {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .stw-fvit-question {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .stw-fvit-faq-media-container .stw-fvit-gallery-wrapper {
        height: 200px;
    }
    
    .stw-fvit-gallery-dot {
        width: 10px;
        height: 10px;
    }
}
