/**
 * Upload Button Contrast Fix
 * =========================
 * 
 * Fixes color contrast issues for the "Upload Your File Now" button
 * and other similar CTA buttons that have poor text/background contrast.
 * 
 * Ensures WCAG AA compliance (4.5:1 contrast ratio minimum).
 * 
 * Target: buttons with classes like custom-style-29bcd606, hover-glow
 */

/* Fix for Upload Your File Now button */
.custom-style-29bcd606,
.custom-style-29bcd606.hover-glow,
button.custom-style-29bcd606,
a.custom-style-29bcd606 {
    /* Ensure high contrast background */
    background: #0F75BD !important; /* Primary blue - 5.8:1 contrast on white */
    background-image: none !important; /* Remove any gradients */
    color: #FFFFFF !important; /* White text for maximum contrast */
    
    /* Clear visual affordances */
    border: 2px solid #0A5A91 !important; /* Darker blue border */
    border-radius: 8px !important;
    
    /* Typography for readability */
    font-weight: 600 !important;
    letter-spacing: 0.025em !important;
    text-shadow: none !important;
    
    /* Ensure clickable appearance */
    box-shadow: 0 4px 8px rgba(15, 117, 189, 0.3) !important;
    transition: all 0.2s ease-in-out !important;
    
    /* Minimum touch targets for accessibility */
    min-height: 44px !important;
    min-width: 120px !important;
    padding: 12px 24px !important;
    
    /* Remove problematic effects */
    filter: none !important;
    -webkit-filter: none !important;
}

/* Hover state with clear contrast */
.custom-style-29bcd606:hover,
.custom-style-29bcd606.hover-glow:hover,
button.custom-style-29bcd606:hover,
a.custom-style-29bcd606:hover {
    background: #1976D2 !important; /* Slightly lighter blue on hover */
    color: #FFFFFF !important; /* Maintain white text */
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.4) !important;
    border-color: #1565C0 !important;
}

/* Active state */
.custom-style-29bcd606:active,
.custom-style-29bcd606.hover-glow:active,
button.custom-style-29bcd606:active,
a.custom-style-29bcd606:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(15, 117, 189, 0.5) !important;
    background: #0A5A91 !important; /* Darker blue when pressed */
}

/* Focus state for accessibility */
.custom-style-29bcd606:focus,
.custom-style-29bcd606:focus-visible,
.custom-style-29bcd606.hover-glow:focus,
button.custom-style-29bcd606:focus,
a.custom-style-29bcd606:focus {
    outline: 3px solid rgba(15, 117, 189, 0.4) !important;
    outline-offset: 2px !important;
}

/* Remove any problematic overlays */
.custom-style-29bcd606::before,
.custom-style-29bcd606::after,
.custom-style-29bcd606.hover-glow::before,
.custom-style-29bcd606.hover-glow::after {
    display: none !important;
}

/* Fix for any similar upload/CTA buttons */
button[class*="upload"],
a[class*="upload"],
button[class*="file-now"],
a[class*="file-now"],
.btn-upload,
.upload-btn,
.file-upload-btn {
    background: #0F75BD !important;
    color: #FFFFFF !important;
    border: 2px solid #0A5A91 !important;
    min-height: 44px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 8px rgba(15, 117, 189, 0.3) !important;
}

.btn-upload:hover,
.upload-btn:hover,
.file-upload-btn:hover,
button[class*="upload"]:hover,
a[class*="upload"]:hover {
    background: #1976D2 !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.4) !important;
}

/* General fix for any buttons with poor contrast */
button[style*="gradient"],
a[style*="gradient"],
.btn[style*="gradient"] {
    background-image: none !important;
    background: #0F75BD !important;
    color: #FFFFFF !important;
}

/* Fix for disabled states */
.custom-style-29bcd606:disabled,
.custom-style-29bcd606.disabled {
    background: #B0BEC5 !important; /* Light gray - 3.9:1 contrast with dark text */
    color: #424242 !important; /* Dark gray text */
    border-color: #90A4AE !important;
    cursor: not-allowed !important;
    opacity: 1 !important; /* Use color instead of opacity for better contrast */
    box-shadow: none !important;
}

/* Ensure text remains readable on all backgrounds */
.custom-style-29bcd606 span,
.custom-style-29bcd606 i,
.custom-style-29bcd606 .fa,
.custom-style-29bcd606 .fas,
.custom-style-29bcd606 .far {
    color: inherit !important;
    text-shadow: none !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .custom-style-29bcd606,
    .custom-style-29bcd606.hover-glow {
        min-height: 48px !important; /* Larger touch target on mobile */
        padding: 14px 20px !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .custom-style-29bcd606,
    .custom-style-29bcd606.hover-glow {
        background: #000000 !important;
        color: #FFFFFF !important;
        border: 3px solid #FFFFFF !important;
    }
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .custom-style-29bcd606,
    .custom-style-29bcd606.hover-glow {
        background: #2196F3 !important; /* Lighter blue for dark backgrounds */
        color: #000000 !important; /* Black text on light blue */
        border-color: #1976D2 !important;
    }
    
    .custom-style-29bcd606:hover,
    .custom-style-29bcd606.hover-glow:hover {
        background: #42A5F5 !important;
        color: #000000 !important;
    }
}