/* Browser Compatibility CSS for FC Manager */
/* Universal prefixes and fallbacks for all browsers */

/* CSS Reset with cross-browser compatibility */
*, *::before, *::after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Flexbox compatibility */
.flex {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

.flex-center {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.flex-between {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
}

.flex-column {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
}

/* Grid compatibility */
.grid {
    display: -ms-grid;
    display: grid;
}

.grid-2-cols {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
}

.grid-3-cols {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr;
}

.grid-4-cols {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* Transform compatibility */
.transform {
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
}

.transform-center {
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

/* Transition compatibility */
.transition {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.transition-fast {
    -webkit-transition: all 0.15s ease;
    -moz-transition: all 0.15s ease;
    -ms-transition: all 0.15s ease;
    -o-transition: all 0.15s ease;
    transition: all 0.15s ease;
}

.transition-slow {
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -ms-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    transition: all 0.5s ease;
}

/* Border radius compatibility */
.rounded {
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
}

.rounded-lg {
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
}

.rounded-xl {
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    border-radius: 12px;
}

.rounded-full {
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
}

/* Box shadow compatibility */
.shadow {
    -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-md {
    -webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    -moz-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    -webkit-box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    -moz-box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Gradient compatibility */
.gradient-blue {
    background: #007bff;
    background: -webkit-linear-gradient(135deg, #007bff, #0056b3);
    background: -moz-linear-gradient(135deg, #007bff, #0056b3);
    background: -ms-linear-gradient(135deg, #007bff, #0056b3);
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.gradient-purple {
    background: #667eea;
    background: -webkit-linear-gradient(135deg, #667eea, #764ba2);
    background: -moz-linear-gradient(135deg, #667eea, #764ba2);
    background: -ms-linear-gradient(135deg, #667eea, #764ba2);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.gradient-green {
    background: #4CAF50;
    background: -webkit-linear-gradient(135deg, #4CAF50, #45a049);
    background: -moz-linear-gradient(135deg, #4CAF50, #45a049);
    background: -ms-linear-gradient(135deg, #4CAF50, #45a049);
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

/* Backdrop filter fallback */
.backdrop-blur {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8);
}

.backdrop-blur-dark {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.8);
}

/* Mobile viewport fixes */
.full-height {
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
}

.min-full-height {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
}

/* Touch action compatibility */
.touch-manipulation {
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

/* User select compatibility */
.select-none {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Appearance reset */
.appearance-none {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Width fit-content compatibility */
.width-fit {
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
}

.width-fill {
    width: 100%;
    width: -webkit-fill-available;
    width: -moz-available;
    width: fill-available;
}

/* Overflow scrolling for iOS */
.scroll-smooth {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Animation compatibility */
@-webkit-keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-moz-keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-webkit-keyframes slideUp {
    from { -webkit-transform: translateY(30px); opacity: 0; }
    to { -webkit-transform: translateY(0); opacity: 1; }
}

@-moz-keyframes slideUp {
    from { -moz-transform: translateY(30px); opacity: 0; }
    to { -moz-transform: translateY(0); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-fadeIn {
    -webkit-animation: fadeIn 0.5s ease-in-out;
    -moz-animation: fadeIn 0.5s ease-in-out;
    animation: fadeIn 0.5s ease-in-out;
}

.animate-slideUp {
    -webkit-animation: slideUp 0.6s ease-out;
    -moz-animation: slideUp 0.6s ease-out;
    animation: slideUp 0.6s ease-out;
}

/* Print compatibility */
@media print {
    .no-print {
        display: none !important;
    }
    
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1a1a1a;
        color: #ffffff;
    }
}
