/* Zyng Mobile - Global Styles */

/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    background-color: #20305D;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #ffffff;
    background-color: #20305D;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Mobile-first typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

p {
    margin: 0;
}

a {
    color: #173563;
    text-decoration: none;
}

/* Brand Colors */
:root {
    --brand-primary: #173563;
    --brand-secondary: #1e2f57;
    --brand-background: #20305D;
    --brand-accent: #47b5ff;
    --brand-gold: #efc93a;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

/* Blazor Error UI */
#blazor-error-ui {
    background: #dc3545;
    color: white;
    padding: 16px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    font-size: 14px;
}

#blazor-error-ui .reload {
    color: white;
    margin-left: 16px;
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* MudBlazor Overrides for Mobile */
.mud-typography {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.mud-input-text {
    font-size: 16px !important; /* Prevents zoom on iOS */
}

.mud-button-root {
    font-family: 'Inter', sans-serif !important;
    text-transform: none !important;
}

.mud-paper {
    border-radius: 12px !important;
}

/* Touch-friendly buttons */
.mud-button-root {
    min-height: 44px;
    min-width: 44px;
}

/* Form inputs */
.mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px !important;
}

/* Cards */
.mud-card {
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Alerts */
.mud-alert {
    border-radius: 12px !important;
}

/* Progress */
.mud-progress-circular {
    color: var(--brand-primary) !important;
}

/* Utility classes */
.text-brand {
    color: var(--brand-primary) !important;
}

.bg-brand {
    background-color: var(--brand-primary) !important;
}

.bg-brand-gradient {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%) !important;
}

/* Safe area padding utilities */
.safe-area-top {
    padding-top: var(--safe-area-top);
}

.safe-area-bottom {
    padding-bottom: var(--safe-area-bottom);
}

/* Loading states */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Pull to refresh indicator */
.pull-indicator {
    display: flex;
    justify-content: center;
    padding: 16px;
    color: var(--gray-500);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Can add dark mode styles here if needed */
}

/* Print styles */
@media print {
    .mobile-nav-bar {
        display: none !important;
    }
}
