/* DmApp Waveform Button Interactions */

/* ===== WAVEFORM RIPPLE BASE ===== */

.waveform-ripple-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    border-radius: inherit;
}

.waveform-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.8s ease-out;
}

/* ===== TYPE-SPECIFIC RIPPLES ===== */

.waveform-rating {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8) 0%, rgba(255, 215, 0, 0) 70%);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.waveform-review {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.6) 0%, rgba(0, 255, 0, 0) 70%);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.waveform-message {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.5) 0%, rgba(0, 255, 0, 0) 70%);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.4);
}

.waveform-promote {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.7) 0%, rgba(0, 255, 0, 0) 70%);
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.7);
}

/* ===== WAVEFORM VISUALIZATION ===== */

.waveform-visualization {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.waveform-bar {
    flex-shrink: 0;
    background: #00FF00;
    border-radius: 2px;
    transition: height 0.1s ease;
}

@keyframes waveformPulse {
    0%, 100% {
        height: 20%;
    }
    50% {
        height: 100%;
    }
}

/* ===== PULSE EFFECT ===== */

.waveform-pulse {
    position: absolute;
    border: 2px solid #00FF00;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes pulseFade {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* ===== SONAR EFFECT ===== */

.waveform-sonar {
    position: absolute;
    border: 3px solid #00FF00;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes sonarExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ===== SOUNDWAVE EFFECT ===== */

.waveform-soundwave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

@keyframes soundwavePulse {
    0%, 100% {
        height: 10px;
        opacity: 0.6;
    }
    50% {
        height: 30px;
        opacity: 1;
    }
}

/* ===== CIRCULAR WAVEFORM ===== */

.waveform-circular {
    position: relative;
    animation: circularRotate 10s linear infinite;
}

@keyframes circularRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes circularPulse {
    0%, 100% {
        height: 20px;
        opacity: 0.6;
    }
    50% {
        height: 40px;
        opacity: 1;
    }
}

/* ===== BUTTON ENHANCEMENTS ===== */

.rate-btn,
.review-btn,
.message-send-btn,
.promote-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.rate-btn:active,
.review-btn:active,
.message-send-btn:active,
.promote-btn:active {
    transform: scale(0.95);
}

/* ===== WAVEFORM GLOW ===== */

.waveform-glow {
    position: relative;
}

.waveform-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.waveform-glow:hover::before {
    opacity: 1;
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ===== RATING STAR WAVEFORM ===== */

.rating-star {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rating-star:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.rating-star:active {
    transform: scale(0.9);
}

/* ===== MESSAGE SEND BUTTON WAVEFORM ===== */

.message-send-btn {
    position: relative;
    background: linear-gradient(135deg, #00FF00, #00CC00);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
}

.message-send-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.message-send-btn:active::after {
    width: 300px;
    height: 300px;
}

/* ===== PROMOTE BUTTON BURST ===== */

.promote-btn {
    position: relative;
}

.promote-btn.activated {
    animation: promoteBurst 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes promoteBurst {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== TANGIBLE TOUCH FEEDBACK ===== */

.tangible-touch {
    position: relative;
    transition: transform 0.1s ease;
}

.tangible-touch:active {
    transform: scale(0.95);
}

.tangible-touch::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.tangible-touch:active::after {
    opacity: 1;
    animation: touchFeedback 0.6s ease-out;
}

@keyframes touchFeedback {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ===== MULTI-WAVE EFFECT ===== */

@keyframes multiWave {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* ===== RADIAL EXPANSION ===== */

@keyframes radialExpand {
    0% {
        width: 10px;
        height: 10px;
        opacity: 0.8;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

.waveform-ripple,
.waveform-pulse,
.waveform-sonar {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* ===== MOBILE TOUCH OPTIMIZATIONS ===== */

@media (max-width: 768px) {
    .waveform-ripple {
        transition-duration: 0.6s;
    }
    
    .message-send-btn::after {
        transition-duration: 0.4s;
    }
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    .waveform-ripple,
    .waveform-pulse,
    .waveform-sonar,
    .waveform-bar {
        animation: none !important;
        transition: none !important;
    }
    
    .tangible-touch::after {
        display: none;
    }
}

/* ===== HIGH CONTRAST MODE ===== */

@media (prefers-contrast: high) {
    .waveform-ripple {
        border: 2px solid currentColor;
        background: none !important;
    }
}
