/* 
 * Einheitliche Button-Animationen für MenoGrace
 * Diese CSS-Datei sorgt für konsistente Button-Interaktionen auf allen Seiten
 */

/* Basis Button-Selektor für alle Button-Elemente */
button,
.cta-button,
.main-cta-button, 
.final-cta-button,
.ja-button,
.continue-btn,
[role="button"],
input[type="submit"],
input[type="button"],
.btn,
.button {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Ripple-Effekt für alle Buttons */
button::before,
.cta-button::before,
.main-cta-button::before,
.final-cta-button::before,
.ja-button::before,
.continue-btn::before,
[role="button"]::before,
input[type="submit"]::before,
input[type="button"]::before,
.btn::before,
.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

/* Ripple-Effekt bei Hover */
button:hover::before,
.cta-button:hover::before,
.main-cta-button:hover::before,
.final-cta-button:hover::before,
.ja-button:hover::before,
.continue-btn:hover::before,
[role="button"]:hover::before,
input[type="submit"]:hover::before,
input[type="button"]:hover::before,
.btn:hover::before,
.button:hover::before {
    width: 300px;
    height: 300px;
}

/* Text über Ripple-Effekt halten */
button span,
.cta-button span,
.main-cta-button span,
.final-cta-button span,
.ja-button span,
.continue-btn span,
[role="button"] span,
.btn span,
.button span {
    position: relative;
    z-index: 2;
}

/* Sanfte Pulsing-Animation für aktive Buttons */
@keyframes buttonPulse {
    0% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
    100% { 
        transform: scale(1); 
    }
}

/* Pulsing nur für primäre CTA-Buttons */
.cta-button:not([disabled]),
.main-cta-button:not([disabled]),
.final-cta-button:not([disabled]),
.ja-button:not([disabled]) {
    animation: buttonPulse 2s ease-in-out infinite;
}

/* Deaktivierte Buttons ohne Animation */
button[disabled],
.continue-btn[disabled],
input[disabled] {
    animation: none;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Hover-Effekte für Desktop */
@media (hover: hover) {
    button:hover:not([disabled]),
    .cta-button:hover:not([disabled]),
    .main-cta-button:hover:not([disabled]),
    .final-cta-button:hover:not([disabled]),
    .ja-button:hover:not([disabled]),
    .continue-btn:hover:not([disabled]),
    [role="button"]:hover:not([disabled]),
    input[type="submit"]:hover:not([disabled]),
    input[type="button"]:hover:not([disabled]),
    .btn:hover:not([disabled]),
    .button:hover:not([disabled]) {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 8px 25px rgba(200, 168, 130, 0.4);
    }
}

/* Active State für alle Buttons */
button:active:not([disabled]),
.cta-button:active:not([disabled]),
.main-cta-button:active:not([disabled]),
.final-cta-button:active:not([disabled]),
.ja-button:active:not([disabled]),
.continue-btn:active:not([disabled]),
[role="button"]:active:not([disabled]),
input[type="submit"]:active:not([disabled]),
input[type="button"]:active:not([disabled]),
.btn:active:not([disabled]),
.button:active:not([disabled]) {
    transform: translateY(0) scale(0.98);
}

/* Focus States für Barrierefreiheit */
button:focus-visible,
.cta-button:focus-visible,
.main-cta-button:focus-visible,
.final-cta-button:focus-visible,
.ja-button:focus-visible,
.continue-btn:focus-visible,
[role="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
.btn:focus-visible,
.button:focus-visible {
    outline: 3px solid rgba(200, 168, 130, 0.5);
    outline-offset: 2px;
}

/* Mobile Optimierungen */
@media (max-width: 768px) {
    /* Reduzierte Animation auf Mobile für bessere Performance */
    button,
    .cta-button,
    .main-cta-button,
    .final-cta-button,
    .ja-button,
    .continue-btn,
    [role="button"],
    input[type="submit"],
    input[type="button"],
    .btn,
    .button {
        animation-duration: 3s; /* Langsamere Animation auf Mobile */
    }
    
    /* Touch-optimierte Hover-Effekte */
    button:active,
    .cta-button:active,
    .main-cta-button:active,
    .final-cta-button:active,
    .ja-button:active,
    .continue-btn:active,
    [role="button"]:active,
    input[type="submit"]:active,
    input[type="button"]:active,
    .btn:active,
    .button:active {
        transform: scale(0.95);
    }
}

/* Reduzierte Animationen für Nutzer mit motion-reduce Präferenz */
@media (prefers-reduced-motion: reduce) {
    button,
    .cta-button,
    .main-cta-button,
    .final-cta-button,
    .ja-button,
    .continue-btn,
    [role="button"],
    input[type="submit"],
    input[type="button"],
    .btn,
    .button {
        animation: none;
        transition: opacity 0.2s ease;
    }
    
    button::before,
    .cta-button::before,
    .main-cta-button::before,
    .final-cta-button::before,
    .ja-button::before,
    .continue-btn::before,
    [role="button"]::before,
    input[type="submit"]::before,
    input[type="button"]::before,
    .btn::before,
    .button::before {
        display: none;
    }
}