/**
 * MLP Video Page Widget Styles
 *
 * @package LandingpageAI Child
 * @since 1.0.0
 */

/* =============================================
   Widget Wrapper & Container
   ============================================= */

.mlp-video-widget-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.mlp-video-widget-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    width: 60%;
    max-width: 100%;
}

/* =============================================
   Farben für Primary Background
   Text: --e-global-color-text (#FCFCFC)
   Buttons: accent (#5C7A7A) mit secondary Text (#FFFFFF)
   ============================================= */

/* Texte auf Primary Background */
.mlp-video-widget-wrapper .mlp-video-headline,
.mlp-video-widget-wrapper .mlp-video-subheadline,
.mlp-video-widget-wrapper .mlp-cta-headline {
    color: var(--e-global-color-text, #FCFCFC);
}

/* Buttons auf Primary Background */
.mlp-video-widget-wrapper .elementor-button {
    background-color: var(--e-global-color-accent, #5C7A7A) !important;
    color: var(--e-global-color-secondary, #FFFFFF) !important;
}

.mlp-video-widget-wrapper .elementor-button:hover {
    background-color: var(--e-global-color-accent, #5C7A7A) !important;
    filter: brightness(1.1);
}

.mlp-video-widget-wrapper .elementor-button .elementor-button-text {
    color: var(--e-global-color-secondary, #FFFFFF) !important;
}

@media (max-width: 1024px) {
    .mlp-video-widget-container {
        width: 100%;
    }
}

/* =============================================
   Headlines
   ============================================= */

.mlp-video-headline,
.mlp-video-subheadline {
    width: 100%;
    margin: 0;
}

.mlp-video-headline {
    text-align: center;
}

.mlp-video-subheadline {
    text-align: center;
}

/* =============================================
   Video Wrapper & Aspect Ratios
   ============================================= */

.mlp-video-wrapper {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    background-color: #000;
}

.mlp-video-wrapper iframe,
.mlp-video-wrapper video {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Aspect Ratio: 16:9 (Default) */
.mlp-video-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

/* Aspect Ratio: 4:3 */
.mlp-video-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

/* Aspect Ratio: 21:9 (Ultrawide) */
.mlp-video-ratio-21-9 {
    aspect-ratio: 21 / 9;
}

/* Aspect Ratio: 1:1 (Square) */
.mlp-video-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

/* Aspect Ratio: 9:16 (Vertical/Mobile) */
.mlp-video-ratio-9-16 {
    aspect-ratio: 9 / 16;
    max-width: 400px;
    margin: 0 auto;
}

/* =============================================
   Video Placeholder (Editor)
   ============================================= */

.mlp-video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 20px;
}

.mlp-video-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.mlp-video-placeholder span {
    font-size: 16px;
    line-height: 1.5;
}

.mlp-video-placeholder small {
    opacity: 0.8;
}

/* =============================================
   CTA Section
   ============================================= */

.mlp-cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 90%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Section versteckt bis der erste Button erscheint */
.mlp-cta-section.mlp-cta-hidden {
    visibility: hidden;
    opacity: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    gap: 0;
}

/* CTA Section wird sichtbar wenn aktiviert */
.mlp-cta-section.mlp-cta-visible {
    visibility: visible;
    opacity: 1;
    height: auto;
    overflow: visible;
    animation: mlpFadeIn 0.5s ease-out;
}

.mlp-cta-headline {
    text-align: center;
    width: 100%;
}

/* =============================================
   CTA Buttons (nutzt Elementor Button Styles)
   ============================================= */

/* Container für Buttons - immer vertikal gestapelt, zentriert */
.mlp-cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Button Widget Container - Standard 100%, wird vom Widget überschrieben */
.mlp-cta-buttons .elementor-widget-button {
    width: 100%;
}

/* Elementor Button Link - volle Breite innerhalb des Containers */
.mlp-cta-buttons .elementor-button {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* Button Text zentrieren */
.mlp-cta-buttons .elementor-button .elementor-button-content-wrapper {
    justify-content: center;
}

/* Fallback für eigene Button-Styles (falls Elementor nicht geladen) */
.mlp-cta-button:not(.elementor-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.mlp-cta-button:not(.elementor-button):hover {
    background-color: #005a87;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mlp-cta-button:not(.elementor-button):focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* =============================================
   CTA Animations & Visibility
   ============================================= */

/* Elementor invisible Klasse für zeitgesteuerte Elemente */
.mlp-cta-timed.elementor-invisible {
    visibility: hidden;
    opacity: 0;
}

/* Animation Basisklasse */
.mlp-cta-timed.animated {
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

/* Fade In Down (wie im Original-Template) */
.mlp-cta-timed.fadeInDown {
    animation-name: mlpFadeInDown;
}

@keyframes mlpFadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Fade In */
.mlp-cta-timed.fadeIn {
    animation-name: mlpFadeIn;
}

@keyframes mlpFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up */
.mlp-cta-timed.slideUp {
    animation-name: mlpSlideUp;
}

@keyframes mlpSlideUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Slide Down */
.mlp-cta-timed.slideDown {
    animation-name: mlpSlideDown;
}

@keyframes mlpSlideDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Zoom In */
.mlp-cta-timed.zoomIn {
    animation-name: mlpZoomIn;
}

@keyframes mlpZoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.8, 0.8, 0.8);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

/* Sink Animation (wie im Original Button-Template) */
.mlp-cta-button.elementor-animation-sink:hover {
    transform: translateY(4px);
}

/* =============================================
   Editor Placeholder Styles
   ============================================= */

.mlp-editor-placeholder {
    background: linear-gradient(135deg, #f0f0f1 0%, #e4e4e7 100%);
    padding: 15px 20px;
    border-radius: 4px;
    color: #50575e;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mlp-editor-placeholder i {
    font-size: 16px;
    opacity: 0.7;
}

.mlp-editor-placeholder-btn {
    background: linear-gradient(135deg, #f0f0f1 0%, #e4e4e7 100%) !important;
    color: #50575e !important;
    font-style: italic;
}

.mlp-editor-placeholder-btn i {
    margin-right: 5px;
}

/* =============================================
   Responsive Adjustments
   ============================================= */

@media (max-width: 768px) {
    .mlp-video-widget-container {
        padding: 0 20px;
    }

    .mlp-video-placeholder i {
        font-size: 36px;
    }

    .mlp-video-placeholder span {
        font-size: 14px;
    }
}

/* =============================================
   Bunny.net Embed Fixes
   ============================================= */

.mlp-video-wrapper iframe[src*="iframe.mediadelivery.net"],
.mlp-video-wrapper iframe[src*="bunny.net"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =============================================
   HLS/m3u8 Video Player Styles
   ============================================= */

.mlp-video-player {
    background-color: #000;
}

.mlp-video-player::-webkit-media-controls {
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
}
