/* CSS-Variablen für einfache Anpassung */
:root {
    /* Animation-Geschwindigkeiten - hier anpassen! */
    --wms-transition-speed: 0.6s;        /* Hauptanimation (Bilder) */
    --wms-transition-speed-fast: 0.4s;   /* Schnellere Elemente (Transform) */
    --wms-transition-speed-text: 0.5s;   /* Text-Animation */
    
    /* Farben */
    --wms-color-primary: #A75D82;
    --wms-color-text: #1d2327;
    --wms-color-text-muted: rgb(125, 125, 125);
    
    /* Easing-Funktionen */
    --wms-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --wms-ease-in-out: ease-in-out;
}

.wms-mockup-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Mockup Wrapper */
.wms-mockup-wrapper {
    flex: 0 0 auto;
    position: relative;
}

.wms-iphone-mockup {
    position: relative;
    width: 300px;
    height: 620px;
    touch-action: pan-y; /* Vertikales Scrollen erlauben, horizontales für Swipe */
    user-select: none; /* Verhindert Text-Selektion beim Swipen */
    -webkit-user-select: none;
}

.wms-mockup-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.wms-mockup-screen {
    position: absolute;
    top: 12px;
    left: 12px;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    border-radius: 28px;
    object-fit: cover;
    z-index: 1;
    transition: opacity 0.6s ease-in-out, transform 0.4s ease-in-out;
    opacity: 1;
    transform: scale(1);
}

.wms-mockup-screen.wms-transitioning {
    opacity: 0;
    transform: scale(0.98);
}

/* Bild-Indikatoren */
.wms-image-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 0; /* Größerer Touch-Bereich */
}

.wms-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d0d0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

/* Größerer Touch-Bereich ohne die visuelle Größe zu ändern */
.wms-indicator::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
}

.wms-indicator:hover {
    background: #a1a1a1;
    transform: scale(1.2);
}

.wms-indicator.active {
    background: #A75D82;
    width: 24px;
    border-radius: 4px;
}

.wms-indicator:focus-visible {
    outline: 2px solid #A75D82;
    outline-offset: 2px;
}

/* Content Wrapper */
.wms-content-wrapper {
    flex: 1;
    width: 100%; /* Wichtig für Scrolling */
    min-width: 0; /* Wichtig für flex-shrink */
}

/* Desktop: max-width begrenzen */
@media (min-width: 769px) {
    .wms-content-wrapper {
        max-width: 600px;
    }
}

/* Tab Buttons */
.wms-tab-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    margin-bottom: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    min-width: 0; /* Wichtig: Erlaubt dem Container zu schrumpfen */
    scroll-behavior: smooth; /* Smooth scrolling für Tab-Wechsel */
    scroll-padding: 20px; /* Padding beim Scrollen (Abstand vom Rand) */
    
    /* Scrollbar verstecken */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.wms-tab-buttons::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge */
}

.wms-tab-button {
    padding: 0;
    padding-bottom: 4px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    color: rgb(125, 125, 125);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.wms-tab-button:hover:not(:disabled) {
    color: #A75D82;
}

.wms-tab-button.active {
    color: #A75D82;
    border-bottom-color: #A75D82;
}

.wms-tab-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Beschreibung */
.wms-description {
    position: relative;
    min-height: 100px;
}

.wms-description p {
    font-size: 18px;
    line-height: 1.7;
    color: #1d2327;
    margin: 0;
    transition: opacity 0.5s ease-in-out, transform 0.4s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.wms-description p.wms-transitioning {
    opacity: 0;
    transform: translateY(10px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wms-mockup-container {
        gap: 40px;
    }
    
    .wms-iphone-mockup {
        width: 250px;
        height: 520px;
    }
    
    .wms-mockup-screen {
        border-radius: 19px;
    }
}

@media (max-width: 768px) {
    .wms-mockup-container {
        flex-direction: column;
        gap: 30px;
        padding: 30px 20px;
    }
    
    .wms-iphone-mockup {
        width: 280px;
        height: 580px;
    }
    
    .wms-tab-buttons {
        gap: 20px;
    }
    
    .wms-tab-button {
        font-size: 14px;
    }
    
    .wms-description p {
        font-size: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .wms-iphone-mockup {
        width: 240px;
        height: 500px;
    }
    
    .wms-tab-buttons {
        gap: 16px;
    }
    
    .wms-tab-button {
        font-size: 13px;
    }
    
    .wms-description p {
        font-size: 15px;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .wms-tab-button {
        color: rgb(150, 150, 150);
    }
    
    .wms-tab-button:hover:not(:disabled) {
        color: #C789A8;
    }
    
    .wms-tab-button.active {
        color: #C789A8;
        border-bottom-color: #C789A8;
    }
    
    .wms-description p {
        color: #e0e0e0;
    }
    
    .wms-indicator {
        background: #4c4c4c;
    }
    
    .wms-indicator.active {
        background: #C789A8;
    }
}

/* Animationen für sanften Bildwechsel */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wms-mockup-screen {
    animation: fadeIn 0.3s ease;
}

.wms-description p {
    animation: slideInUp 0.3s ease;
}

/* Accessibility */
.wms-tab-button:focus-visible {
    outline: 2px solid #A75D82;
    outline-offset: 4px;
}

/* Loading State */
.wms-mockup-container.loading {
    opacity: 0.5;
    pointer-events: none;
}

.wms-mockup-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
