/**
 * Background Music Permission Prompt
 * User-friendly dialog to enable/disable background music
 */

.music-prompt-overlay {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    z-index: 9999999999; /* Higher than sliding door (999999999) */
    pointer-events: none; /* Let clicks pass through to sliding door */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0 15px; /* Add horizontal padding for mobile */
    box-sizing: border-box;
    max-width: 100%;
}

.music-prompt-overlay.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.music-prompt-dialog {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 50px;
    padding: 15px 25px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    pointer-events: auto; /* Enable clicks on dialog */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Slide up animation on overlay level */
.music-prompt-overlay {
    transform: translateX(-50%) translateY(150px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.music-prompt-overlay.show {
    transform: translateX(-50%) translateY(0);
}

.music-prompt-icon {
    width: 40px;
    height: 40px;
    margin: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    animation: pulse-icon 2s infinite;
}

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

.music-prompt-text {
    flex: 1;
    text-align: left;
}

.music-prompt-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin: 0 0 2px 0;
}

.music-prompt-message {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
    margin: 0;
}

.music-prompt-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.music-prompt-btn {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.music-prompt-btn-yes {
    background: white;
    color: #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.music-prompt-btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.music-prompt-btn-no {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.music-prompt-btn-no:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .music-prompt-overlay {
        padding: 0 12px;
    }

    .music-prompt-dialog {
        padding: 14px 20px;
        gap: 15px;
    }

    .music-prompt-icon {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }

    .music-prompt-title {
        font-size: 13px;
    }

    .music-prompt-message {
        font-size: 10px;
    }

    .music-prompt-btn {
        padding: 7px 14px;
        font-size: 11px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .music-prompt-overlay {
        bottom: 20px;
        padding: 0 10px; /* Reduce padding on very small screens */
    }

    .music-prompt-dialog {
        padding: 12px 15px;
        max-width: 100%;
        gap: 10px;
        border-radius: 30px; /* Smaller radius for mobile */
    }

    .music-prompt-icon {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .music-prompt-text {
        flex: 1;
        min-width: 0; /* Allow text to shrink */
    }

    .music-prompt-title {
        font-size: 12px;
    }

    .music-prompt-message {
        font-size: 9px;
    }

    .music-prompt-buttons {
        gap: 6px;
        flex-shrink: 0;
    }

    .music-prompt-btn {
        padding: 6px 12px;
        font-size: 10px;
        white-space: nowrap;
    }
}
