/* ========================================
   Material 3 Design System - Color Overrides
   ======================================== */

:root {
    /* Primary Teal Colors */
    --rz-primary: #0f766e;              /* teal-700 */
    --rz-primary-darker: #134e4a;       /* teal-900 */
    --rz-primary-dark: #115e59;         /* teal-800 */
    --rz-primary-light: #8fd8d2;        /* soft teal */
    --rz-primary-lighter: #d8f3f0;      /* pastel teal tint */

    /* Semantic Colors */
    --rz-warning: #ea580c;              /* orange-600 */
    --rz-warning-dark: #c2410c;         /* orange-700 */
    --rz-warning-darker: #9a3412;       /* orange-800 */
    --rz-warning-light: #fed7aa;        /* orange-200 */
    --rz-warning-lighter: #ffedd5;      /* orange-100 */

    --rz-success: #16a34a;              /* green-600 */
    --rz-success-dark: #15803d;         /* green-700 */
    --rz-success-darker: #166534;       /* green-800 */
    --rz-success-light: #bbf7d0;        /* green-200 */
    --rz-success-lighter: #dcfce7;      /* green-100 */

    --rz-danger: #dc2626;               /* red-600 */
    --rz-danger-dark: #b91c1c;          /* red-700 */
    --rz-danger-darker: #991b1b;        /* red-800 */
    --rz-danger-light: #fecaca;         /* red-200 */
    --rz-danger-lighter: #fee2e2;       /* red-100 */

    --rz-info: #2563eb;                 /* blue-600 */
    --rz-info-dark: #1d4ed8;            /* blue-700 */
    --rz-info-darker: #1e40af;          /* blue-800 */
    --rz-info-light: #bfdbfe;           /* blue-200 */
    --rz-info-lighter: #dbeafe;         /* blue-100 */

    /* Base/Background Colors (Stone palette) */
    --rz-base-background-color: #fdfcfa;
    --rz-base-50: #fafaf9;
    --rz-base-100: #f5f5f4;
    --rz-base-200: #e7e5e4;
    --rz-base-300: #d6d3d1;
    --rz-base-400: #a8a29e;
    --rz-base-500: #78716c;
    --rz-base-600: #57534e;
    --rz-base-700: #44403c;
    --rz-base-800: #292524;
    --rz-base-900: #1c1917;
    
    /* Form Field */
    --rz-input-value-color: var(--rz-base-800);
    --rz-input-placeholder-color: var(--rz-base-600);
    --rz-form-field-filled-background-color: var(--rz-base-100);
    --rz-form-field-filled-hover-background-color: var(--rz-base-200);

    /* Border Radius (Material 3 rounded) */
    --rz-border-radius: 12px;           /* base */
    --rz-border-radius-8: 20px;         /* large (rounded-2xl) */
    --rz-border-radius-10: 24px;        /* extra-large (rounded-3xl) */
    --rz-grid-border-radius: calc(var(--rz-border-radius) * 2);

    /* Card Styling Overrides */
    --rz-card-background-color: white;
    --rz-card-border: 1px solid var(--rz-base-200);
    --rz-card-border-radius: 24px;
    --rz-card-padding: 1.25rem;
    --rz-card-shadow: none;
    
    /* Badge */
    --rz-badge-font-size: 0.625rem;
    --rz-badge-padding: 0.125rem 0.5rem;
    --rz-badge-pill-padding: 0.125rem 0.5rem;
    
    /* Selectbar */
    --rz-selectbar-selected-background-color: var(--rz-primary-lighter);
    --rz-selectbar-border: 1px solid var(--rz-base-200);
    --rz-selectbar-border-radius: 10px;
    --rz-selectbar-selected-border: 1px solid var(--rz-base-200);
    
    /* FormField */
    --rz-form-field-label-floating-background-color: transparent;

    /* App Type Scale (semantic layer on top of Radzen tokens) */
    --ui-font-size-2xs: 0.625rem; /* 10px */
    --ui-font-size-xs: 0.75rem;   /* 12px */
    --ui-font-size-sm: 0.875rem;  /* 14px */
    --ui-font-size-md: 1rem;      /* 16px */
    --ui-font-size-lg: 1.125rem;  /* 18px */
    --ui-font-size-xl: 1.25rem;   /* 20px */
    --ui-font-size-2xl: 1.5rem;   /* 24px */
    --ui-font-size-3xl: 1.875rem; /* 30px */
    --ui-font-size-4xl: 2.25rem;  /* 36px */
    --ui-font-size-5xl: 3rem;     /* 48px */

    /* App Spacing and Radius Scale */
    --ui-space-1: 0.25rem;
    --ui-space-2: 0.5rem;
    --ui-space-3: 0.75rem;
    --ui-space-4: 1rem;
    --ui-space-5: 1.25rem;
    --ui-space-6: 1.5rem;
    --ui-space-8: 2rem;
    --ui-space-10: 3rem;
    --ui-radius-sm: 8px;
    --ui-radius-md: var(--rz-border-radius);
    --ui-radius-lg: 16px;
    --ui-radius-xl: var(--rz-card-border-radius);
    --ui-radius-pill: 9999px;

    /* App Icon Scale */
    --ui-icon-size-xs: 12px;
    --ui-icon-size-sm: 14px;
    --ui-icon-size-md: 16px;
    --ui-icon-size-lg: 18px;
    --ui-icon-size-xl: 20px;
    --ui-icon-size-2xl: 24px;
    --ui-icon-size-3xl: 36px;
    --ui-icon-size-4xl: 48px;
    --ui-icon-size-5xl: 64px;
}

body {
    background-color: var(--rz-base-background-color);
    font-family: var(--rz-text-font-family, 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif);
}

/* ========================================
   Global Radzen Component Overrides
   ======================================== */

/* Remove button shadows for cleaner Material 3 look */
.rz-button {
    box-shadow: none !important;
}

.rz-card.rz-variant-outlined {
    background-color: white;
}

/* Selectbar */

.rz-selectbar {
    width: 100%;
    background-color: var(--rz-base-100) !important; /* stone-100 */
    padding: 0.25rem !important;
    border-radius: 12px !important;
    border: 1px solid var(--rz-base-200) !important; /* stone-200 */
}

.rz-selectbar .rz-button {
    border-radius: 10px !important;
    padding: 0.625rem 1.25rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-transform: capitalize !important;
    border: none !important;
    min-width: 80px !important;
    flex: 1 !important;
    text-align: center !important;
}

.rz-selectbar .rz-state-active {
    background-color: white !important;
    color: var(--rz-base-900) !important; /* stone-900 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
    font-weight: 600 !important;
}

.rz-selectbar .rz-button:not(.rz-state-active) {
    color: var(--rz-base-500) !important; /* stone-500 */
    background-color: transparent !important;
}

.rz-selectbar .rz-button:not(.rz-state-active):hover {
    font-weight: 600 !important;
}

.rz-selectbar.rz-selectbar-horizontal {
    flex-direction: column;
}

@media (min-width: 768px) {
    .rz-selectbar.rz-selectbar-horizontal {
        flex-direction: row;
    }
}

/* Notification */
.rz-notification {
    inset-block-start: 24px;
}

/* Alert */
.rz-alert .rz-alert-item {
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

/* ========================================
   Legacy Styles (kept for compatibility)
   ======================================== */

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--rz-success);
}

.invalid {
    outline: 1px solid var(--rz-danger);
}

.validation-message {
    color: var(--rz-danger);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, var(--rz-danger-dark);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scale-up {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

.animate-slide-up {
    animation: slide-up 0.3s ease-out;
}

.animate-slide-right {
    animation: slide-right 0.3s ease-out;
}

.animate-scale-up {
    animation: scale-up 0.5s ease-out;
}

.animate-shake {
    animation: shake 0.5s ease-out;
}

/* ========================================
   Shared App Utilities
   ======================================== */

.ui-page-pad {
    padding: 1rem;
}

@media (min-width: 768px) {
    .ui-page-pad {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .ui-page-pad {
        padding: 2rem;
    }
}

.ui-card-base {
    background-color: white !important;
    border: 1px solid var(--rz-base-200) !important;
    border-radius: var(--rz-card-border-radius) !important;
    padding: 1.5rem !important;
}

.ui-card-section {
    background-color: white;
    border: 1px solid var(--rz-base-200);
    border-radius: var(--rz-border-radius);
    padding: 1.5rem;
}

.ui-section-overline {
    font-size: var(--ui-font-size-sm);
    font-weight: 600;
    color: var(--rz-base-700);
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ui-data-label {
    font-size: var(--ui-font-size-xs);
    color: var(--rz-base-500);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ui-data-value {
    font-size: var(--ui-font-size-md);
    font-weight: 600;
    color: var(--rz-base-900);
}

.ui-center-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: var(--rz-base-500);
}

.ui-page-shell {
    max-width: 1280px;
    margin: 0 auto;
}

.ui-page-title {
    font-size: var(--ui-font-size-3xl);
    font-weight: 700;
    color: var(--rz-base-900);
    margin: 0;
}

.ui-page-subtitle {
    font-size: var(--ui-font-size-sm);
    color: var(--rz-base-500);
}

.ui-page-title-app {
    font-size: var(--ui-font-size-3xl);
    font-weight: 400;
    color: var(--rz-base-800);
    margin: 0;
}

.ui-page-subtitle-app {
    color: var(--rz-base-500);
}

.ui-empty-card {
    border-radius: 24px !important;
    padding: 0.5rem !important;
}

.ui-w-full {
    width: 100% !important;
}

.ui-display-contents {
    display: contents;
}

.ui-cursor-pointer {
    cursor: pointer;
}

.ui-mt-6 {
    margin-top: 1.5rem;
}

.ui-p-0 {
    padding: 0 !important;
}

.ui-border-none {
    border: none !important;
}

.ui-ml-auto {
    margin-left: auto;
}

.ui-font-medium {
    font-weight: 500;
}

.ui-text-capitalize {
    text-transform: capitalize;
}

.ui-icon-xs {
    font-size: var(--ui-icon-size-xs);
}

.ui-icon-sm {
    font-size: var(--ui-icon-size-sm);
}

.ui-icon-md {
    font-size: var(--ui-icon-size-md);
}

.ui-icon-lg {
    font-size: var(--ui-icon-size-lg);
}

.ui-icon-xl {
    font-size: var(--ui-icon-size-xl);
}

.ui-icon-2xl {
    font-size: var(--ui-icon-size-2xl);
}

.ui-icon-3xl {
    font-size: var(--ui-icon-size-3xl);
}

.ui-icon-4xl {
    font-size: var(--ui-icon-size-4xl);
}

.ui-icon-5xl {
    font-size: var(--ui-icon-size-5xl);
}

.ui-text-primary {
    color: var(--rz-primary);
}

.ui-text-primary-dark {
    color: var(--rz-primary-dark);
}

.ui-text-muted {
    color: var(--rz-base-400);
}

.ui-text-success {
    color: var(--rz-success);
}

.ui-text-warning {
    color: var(--rz-warning);
}

.ui-text-info {
    color: var(--rz-info);
}

.ui-text-accent {
    color: #8b5cf6;
}

.ui-text-orange {
    color: var(--rz-warning-dark);
}

.ui-text-orange-soft {
    color: var(--rz-warning-light);
}

.ui-text-teal-soft {
    color: var(--rz-primary-light);
}


