/**
 * Redirect Handler Styles
 * Provides visual feedback for redirect actions
 */

/* Loading state for redirect buttons */
.redirect-loading {
    position: relative;
    opacity: 0.7;
    cursor: not-allowed !important;
}

.redirect-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: redirect-spin 1s linear infinite;
}

@keyframes redirect-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced button states */
.top-btn.redirect-loading,
.casino-play-btn.redirect-loading,
.header_button.redirect-loading {
    background: linear-gradient(135deg, #666 0%, #888 100%) !important;
    transform: scale(0.98);
    transition: all 0.3s ease;
}

/* Hover effects for external links */
a[target="_blank"]:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* Visual indicator for external links */
a[target="_blank"]:not(.no-external-icon)::after {
    content: '↗';
    margin-left: 4px;
    font-size: 0.8em;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

a[target="_blank"]:not(.no-external-icon):hover::after {
    opacity: 1;
}

/* Loading overlay for page redirects */
.redirect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.redirect-overlay.active {
    opacity: 1;
    visibility: visible;
}

.redirect-overlay-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.redirect-overlay-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1e3fb8;
    border-radius: 50%;
    animation: redirect-spin 1s linear infinite;
    margin: 0 auto 20px;
}

.redirect-overlay-text {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .redirect-overlay-content {
        margin: 20px;
        padding: 20px;
    }
    
    .redirect-overlay-text {
        font-size: 14px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .redirect-loading::after,
    .redirect-overlay-spinner {
        animation: none;
    }
    
    a[target="_blank"]:hover {
        transform: none;
    }
}

/* Focus states for keyboard navigation */
a[target="_blank"]:focus,
.top-btn:focus,
.casino-play-btn:focus {
    outline: 2px solid #1e3fb8;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .redirect-loading::after {
        border-top-color: #000000;
    }
    
    .redirect-overlay-spinner {
        border-top-color: #000000;
    }
}
