/**
 * ParkFM Player CSS
 * Modern styling voor WordPress plugin
 */

/* Button Container */
.parkfm-player-container {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    max-width: 400px;
}

/* Main Player Button */
.parkfm-player-button {
    background: linear-gradient(45deg, #E31E24, #ff4444) !important;
    border: none !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(227, 30, 36, 0.3) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    min-width: auto !important;
    white-space: nowrap !important;
}

.parkfm-player-button:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    transform: rotate(45deg);
    transition: all 0.5s ease;
    z-index: 0;
}

.parkfm-player-button:hover:before {
    animation: shimmer 1s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.parkfm-player-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.5) !important;
    background: linear-gradient(45deg, #ff4444, #E31E24) !important;
}

.parkfm-player-button:focus {
    outline: 2px solid #E31E24 !important;
    outline-offset: 2px !important;
}

.parkfm-player-button:active {
    transform: translateY(0px) !important;
    box-shadow: 0 2px 8px rgba(227, 30, 36, 0.6) !important;
}

/* Button text */
.parkfm-player-button span,
.parkfm-player-button {
    position: relative;
    z-index: 1;
}

/* Embedded Player */
.parkfm-embedded-player {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #1e1934 0%, #3f3f46 100%);
    margin: 20px auto;
}

/* Widget Styling */
.widget .parkfm-player-container {
    margin: 15px 0;
}

.widget .parkfm-player-button {
    padding: 10px 20px !important;
    font-size: 14px !important;
    width: 100% !important;
    min-width: auto !important;
}

/* Popup Notice */
.parkfm-popup-notice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.parkfm-popup-notice-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    margin: 20px;
    position: relative;
}

.parkfm-popup-notice h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

.parkfm-popup-notice p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.5;
}

.parkfm-retry-btn {
    background: linear-gradient(45deg, #40fdaf, #64d9ff);
    border: none;
    color: #1e1934;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.parkfm-retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(64, 253, 175, 0.4);
}

.parkfm-close-notice {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 5px;
    line-height: 1;
}

.parkfm-close-notice:hover {
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .parkfm-player-button {
        padding: 12px 24px !important;
        font-size: 16px !important;
        width: 100% !important;
        max-width: 280px !important;
    }
    
    .parkfm-player-container {
        padding: 5px;
        margin: 15px auto;
    }
    
    .parkfm-popup-notice-content {
        margin: 10px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .parkfm-player-button {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    
    .parkfm-popup-notice-content {
        padding: 15px;
    }
    
    .parkfm-popup-notice h4 {
        font-size: 18px;
    }
}

/* Dark Theme Compatibility */
.dark-theme .parkfm-player-container,
body.dark .parkfm-player-container,
.wp-dark-theme .parkfm-player-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
}

/* RTL Support */
.rtl .parkfm-player-button {
    direction: rtl;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .parkfm-player-button {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .parkfm-player-button,
    .parkfm-player-button:before,
    .parkfm-retry-btn {
        transition: none !important;
        animation: none !important;
    }
    
    .parkfm-player-button:hover {
        transform: none !important;
    }
}

/* Print Styles */
@media print {
    .parkfm-player-container,
    .parkfm-popup-notice {
        display: none !important;
    }
}

/* Focus Indicators voor Accessibility */
.parkfm-player-button:focus-visible {
    outline: 3px solid #40fdaf !important;
    outline-offset: 3px !important;
}

/* Loading State */
.parkfm-player-button.loading {
    opacity: 0.7;
    cursor: wait;
}

.parkfm-player-button.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(30, 25, 52, 0.3);
    border-top: 2px solid #1e1934;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error States */
.parkfm-player-button.success {
    background: linear-gradient(45deg, #4ade80, #22c55e) !important;
}

.parkfm-player-button.error {
    background: linear-gradient(45deg, #f87171, #ef4444) !important;
    color: white !important;
}

/* Animation Classes */
.parkfm-bounce {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}
