/**
 * Under Construction Widget Styles
 * myLandingpage.ai - Moderne Under Construction Page
 * 
 * Farbsystem:
 * - Primary (#0A394E): Hintergrund
 * - Accent (#5C7A7A): Card/Button-Hintergrund
 * - Text (#FCFCFC): Text auf Primary
 * - Secondary (#FFFFFF): Text auf Accent/Buttons
 * 
 * @package LandingPageAI
 * @since 1.0.0
 */

/* CSS Variablen - Elementor Global Colors */
.uc-widget {
    --uc-primary: var(--e-global-color-primary, #0A394E);
    --uc-accent: var(--e-global-color-accent, #5C7A7A);
    --uc-text: var(--e-global-color-text, #FCFCFC);
    --uc-secondary: var(--e-global-color-secondary, #FFFFFF);
}

/* Base Styles */
.uc-widget * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.uc-widget {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    min-height: 100vh; /* Volle Höhe - Fußzeile wird automatisch ausgeblendet bei under_construction */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--uc-primary); /* Primary als Haupthintergrund */
    overflow-x: hidden;
    position: relative;
}

/* Subtiler Overlay für Tiefe */
.uc-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
    animation: uc-gradientShift 20s ease-in-out infinite;
}

@keyframes uc-gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Main Container - kompakter */
.uc-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    width: 100%;
    max-width: 100%;
    min-height: calc(100vh - 60px); /* Platz für Widget-Footer */
    position: relative;
    z-index: 1;
}

/* Character Image - flexibel für Hoch-/Querformat */
.uc-character-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    margin-top: -30px;
    padding: 2rem 1rem; /* Abstand oben/unten */
    max-width: 90%;
    max-height: calc(100vh - 250px); /* Platz für Card + Footer */
    display: flex;
    align-items: center;
    justify-content: center;
}

.uc-character-image {
    max-width: 100%;
    max-height: calc(100vh - 250px); /* Automatisch an Viewport anpassen */
    width: auto;
    height: auto;
    object-fit: contain;
    animation: uc-float 10s ease-in-out infinite;
    filter: drop-shadow(0 15px 30px rgba(10, 57, 78, 0.25));
    transition: transform 0.3s ease;
    opacity: 0.9;
}

.uc-character-image:hover {
    transform: scale(1.02);
}

@keyframes uc-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Content Card - Button-Style mit Accent */
.uc-content-card {
    background: var(--uc-accent); /* Accent als Card-Hintergrund */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
    position: relative;
    border-radius: 16px;
    padding: 2rem 2rem;
    margin-top: 100px;
    box-shadow:
        0 8px 32px rgba(10, 57, 78, 0.20),
        0 2px 8px rgba(10, 57, 78, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    max-width: 550px;
    width: 90%;
    animation: uc-slideUp 0.8s ease-out;
}

@keyframes uc-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography - Secondary (#FFFFFF) auf Accent */
.uc-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--uc-secondary); /* Weiß auf Accent */
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Loading Animation - Weiß */
.uc-loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 1rem 0;
}

.uc-loading-dots span {
    width: 10px;
    height: 10px;
    background: var(--uc-secondary); /* Weiß */
    border-radius: 50%;
    animation: uc-bounce 1.4s ease-in-out infinite;
}

.uc-loading-dots span:nth-child(1) { animation-delay: 0s; }
.uc-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.uc-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes uc-bounce {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Rotating Message - Weiß */
.uc-status-message {
    font-size: 1rem;
    color: var(--uc-secondary); /* Weiß auf Accent */
    min-height: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
    opacity: 0.9;
}

.uc-status-message.uc-fade-out {
    opacity: 0;
}

.uc-status-message.uc-fade-in {
    opacity: 0.9;
}

/* Progress Bar - Weiß */
.uc-progress-container {
    width: 100%;
    max-width: 250px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 1rem auto 0;
    overflow: hidden;
}

.uc-progress-bar {
    height: 100%;
    background: var(--uc-secondary); /* Weiß */
    border-radius: 2px;
    animation: uc-progressLoop 3s ease-in-out infinite;
}

@keyframes uc-progressLoop {
    0% { width: 0%; margin-left: 0%; }
    50% { width: 60%; margin-left: 20%; }
    100% { width: 0%; margin-left: 100%; }
}

/* Footer - Text-Farbe (#FCFCFC) auf Primary */
.uc-footer {
    padding: 1rem;
    text-align: center;
    width: 100%;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.uc-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--uc-text); /* Text-Farbe auf Primary */
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.uc-footer-link:hover {
    opacity: 1;
    color: var(--uc-secondary); /* Heller bei Hover */
}

.uc-footer-link svg {
    width: 16px;
    height: 16px;
}

/* Responsive - flexibles Bild */
@media (max-width: 768px) {
    .uc-widget {
        min-height: 100vh;
    }
    
    .uc-container {
        padding: 1rem;
        min-height: calc(100vh - 50px);
    }
    
    .uc-character-wrapper {
        margin-top: -20px;
        padding: 1.5rem 0.5rem;
        max-height: calc(100vh - 200px);
    }
    
    .uc-character-image {
        max-height: calc(100vh - 250px);
    }
    
    .uc-content-card {
        padding: 1.5rem 1.25rem;
        border-radius: 14px;
        margin-top: 80px;
    }
    
    .uc-main-title {
        font-size: 1.25rem;
    }
    
    .uc-status-message {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .uc-character-wrapper {
        margin-top: -10px;
        padding: 1rem 0.5rem;
        max-height: calc(100vh - 180px);
    }
    
    .uc-character-image {
        max-height: calc(100vh - 220px);
    }
    
    .uc-main-title {
        font-size: 1.1rem;
    }
    
    .uc-content-card {
        padding: 1.25rem 1rem;
        margin-top: 60px;
        width: 95%;
    }
    
    .uc-loading-dots span {
        width: 8px;
        height: 8px;
    }
}

/* Landscape-Modus (Querformat-Viewport) */
@media (max-height: 600px) and (orientation: landscape) {
    .uc-character-wrapper {
        max-height: 50vh;
        margin-top: 0;
    }
    
    .uc-character-image {
        max-height: 45vh;
    }
    
    .uc-content-card {
        margin-top: 40px;
        padding: 1rem;
    }
    
    .uc-main-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .uc-loading-dots {
        margin: 0.5rem 0;
    }
    
    .uc-progress-container {
        margin-top: 0.5rem;
    }
}

/* Dark mode - dunkleres Primary */
.uc-widget.uc-dark-mode {
    background: linear-gradient(168deg, #051525 0%, var(--uc-primary) 100%);
}

.uc-widget.uc-dark-mode::before {
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(92, 122, 122, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
}

/* Subtle hover effect on card */
.uc-content-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.uc-content-card:hover::after {
    opacity: 1;
}

/* Custom ACF Colors - überschreiben wenn gesetzt */
.uc-widget.uc-has-custom-bg {
    background: var(--uc-custom-bg);
}

.uc-widget.uc-has-custom-bg .uc-content-card {
    background: var(--uc-custom-accent, var(--uc-accent));
}

.uc-widget.uc-has-custom-bg .uc-main-title,
.uc-widget.uc-has-custom-bg .uc-status-message,
.uc-widget.uc-has-custom-bg .uc-loading-dots span,
.uc-widget.uc-has-custom-bg .uc-progress-bar {
    color: var(--uc-secondary);
    background: var(--uc-secondary);
}

.uc-widget.uc-has-custom-bg .uc-main-title,
.uc-widget.uc-has-custom-bg .uc-status-message {
    background: transparent;
}

.uc-widget.uc-has-custom-bg .uc-footer-link {
    color: var(--uc-custom-text, var(--uc-text));
}

/* Animation toggle */
.uc-widget.uc-no-animations,
.uc-widget.uc-no-animations * {
    animation: none !important;
    transition: none !important;
}

.uc-widget.uc-no-animations .uc-loading-dots span {
    opacity: 1;
    transform: scale(1);
}

/* Elementor Editor specific */
.elementor-editor-active .uc-widget {
    min-height: 500px;
}
