/**
 * SRRU Mascot Styles
 * สไตล์สำหรับน้องช้างมาสคอต์
 */

#srru-mascot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    pointer-events: none;
    transition: transform 0.1s ease-out;
}

.mascot-wrapper {
    position: relative;
    pointer-events: auto;
}

.mascot-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    padding: 10px;
}

.mascot-image:hover {
    transform: scale(1.1);
}

/* Animation เด้ง */
.mascot-bounce {
    animation: mascotBounce 0.6s ease-in-out;
}

@keyframes mascotBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-15px) scale(1.1); }
    50% { transform: translateY(-25px) scale(1.15); }
    75% { transform: translateY(-10px) scale(1.05); }
}

/* Speech Bubble */
.mascot-speech-bubble {
    position: absolute;
    bottom: 160px;
    right: 0;
    background: white;
    color: #333;
    padding: 15px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    max-width: 280px;
    min-width: 200px;
    opacity: 0;
    transform: translateY(10px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(0,0,0,0.1);
}

.mascot-speech-bubble.speech-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.speech-text {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    color: #333;
    text-shadow: none;
}

.speech-arrow {
    position: absolute;
    bottom: -8px;
    right: 35px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}

.speech-arrow::before {
    content: '';
    position: absolute;
    bottom: 1px;
    left: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    #srru-mascot {
        bottom: 15px;
        right: 15px;
    }
    
    .mascot-image {
        width: 100px;
        height: 100px;
        padding: 8px;
    }
    
    .mascot-speech-bubble {
        bottom: 110px;
        max-width: 220px;
        min-width: 170px;
        padding: 12px 16px;
        right: -20px;
    }
    
    .speech-text {
        font-size: 13px;
    }
    
    .speech-arrow {
        right: 45px;
    }
}

@media (max-width: 480px) {
    #srru-mascot {
        bottom: 10px;
        right: 10px;
    }
    
    .mascot-image {
        width: 90px;
        height: 90px;
        padding: 6px;
    }
    
    .mascot-speech-bubble {
        bottom: 100px;
        max-width: 200px;
        min-width: 150px;
        padding: 10px 14px;
        right: -30px;
    }
    
    .speech-text {
        font-size: 12px;
    }
}

/* Special Effects */
.mascot-image {
    animation: mascotIdle 4s ease-in-out infinite;
}

@keyframes mascotIdle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    75% { transform: rotate(-1deg); }
}

/* Glow effect on hover */
.mascot-image:hover {
    transform: scale(1.1);
}

/* Pulse effect for speech bubble */
.mascot-speech-bubble.speech-show {
    animation: speechPulse 0.5s ease-out;
}

@keyframes speechPulse {
    0% { transform: translateY(0) scale(0.8); }
    50% { transform: translateY(-5px) scale(1.05); }
    100% { transform: translateY(0) scale(1); }
}

/* Floating animation enhancement */
#srru-mascot {
    animation: mascotFloat 6s ease-in-out infinite;
}

@keyframes mascotFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Click ripple effect */
.mascot-image:active {
    transform: scale(0.95);
}

.mascot-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.mascot-image:active::after {
    width: 150px;
    height: 150px;
}