﻿
/* Root variables for colors and themes */
:root {
    /* 🎨 COLORS */
    --color-primary: #007bff;
    --color-secondary: #6c757d;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
    --color-light: #f8f9fa;
    --color-dark: #343a40;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-muted: #6c757d;
    --color-border: #e0e0e0;
    --color-surface: #f4f4f4;
    --color-background: #ffffff;
    --color-text: #212529;

    /* 📐 SPACING (Padding / Margin) in px */
    --space-0: 0px;
    --space-2: 2px;
    --space-4: 4px;
    --space-6: 6px;
    --space-8: 8px;
    --space-10: 10px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --space-40: 40px;
    --space-48: 48px;
    --space-64: 64px;

    /* ⬜ WIDTHS */
    --width-64: 64px;
    --width-96: 96px;
    --width-128: 128px;
    --width-160: 160px;
    --width-192: 192px;
    --width-240: 240px;
    --width-320: 320px;
    --width-480: 480px;
    --width-640: 640px;
    --width-960: 960px;
    --width-1280: 1280px;
    --width-full: 100%;

    /* ⬆ HEIGHTS */
    --height-32: 32px;
    --height-48: 48px;
    --height-64: 64px;
    --height-80: 80px;
    --height-96: 96px;
    --height-128: 128px;
    --height-160: 160px;
    --height-240: 240px;
    --height-320: 320px;
    --height-full: 100%;

    /* 🔠 FONT SIZES (px) */
    --font-10: 10px;
    --font-12: 12px;
    --font-14: 14px;
    --font-16: 16px;
    --font-18: 18px;
    --font-20: 20px;
    --font-24: 24px;
    --font-28: 28px;
    --font-32: 32px;
    --font-40: 40px;

    /* 🔡 FONT WEIGHTS */
    --font-300: 300;
    --font-400: 400;
    --font-500: 500;
    --font-600: 600;
    --font-700: 700;

    /* 🟦 BORDER RADIUS (px) */
    --radius-0: 0px;
    --radius-2: 2px;
    --radius-4: 4px;
    --radius-6: 6px;
    --radius-8: 8px;
    --radius-12: 12px;
    --radius-16: 16px;
    --radius-full: 9999px;

    /* 🧱 SHADOWS */
    --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-2: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-3: 0 10px 15px rgba(0, 0, 0, 0.15);

    /* ⏱ TRANSITIONS */
    --transition-150: 150ms ease-in-out;
    --transition-300: 300ms ease-in-out;
    --transition-500: 500ms ease-in-out;

    /* 📶 Z-INDEX */
    --z-0: 0;
    --z-100: 100;
    --z-200: 200;
    --z-500: 500;
    --z-1000: 1000;
    --z-modal: 1100;
    --z-toast: 1200;

    /* 🎯 COMPONENT-SPECIFIC DIMENSIONS */
    --btn-height: var(--height-48);
    --input-height: var(--height-48);
    --card-padding: var(--space-16);
    --form-gap: var(--space-24);

    /* 🎛️ RADZEN OVERRIDES */
    --rz-primary: var(--color-primary);
    --rz-secondary: var(--color-secondary);
    --rz-success: var(--color-success);
    --rz-danger: var(--color-danger);
    --rz-warning: var(--color-warning);
    --rz-info: var(--color-info);
}

[data-theme="dark"] {
    --border: #4b5563;
    --black: #f5f5f5;
    --white: #1f2937;
    --primary: #3b82f6;
    --secondary: #374151;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --text-primary: #f5f5f5;
    --text-secondary: #d1d5db;
    --label: #d1d5db;
    --header-title: #f5f5f5;
    --gray-100: #1f2937;
    --error: #f87171;
    --success: #34d399;
}

/* Padding */
.p-0 {
    padding: var(--space-0);
}

.p-2 {
    padding: var(--space-2);
}

.p-4 {
    padding: var(--space-4);
}

.p-6 {
    padding: var(--space-6);
}

.p-8 {
    padding: var(--space-8);
}

.p-10 {
    padding: var(--space-10);
}

.p-12 {
    padding: var(--space-12);
}

.p-16 {
    padding: var(--space-16);
}

.p-20 {
    padding: var(--space-20);
}

.p-24 {
    padding: var(--space-24);
}

.p-32 {
    padding: var(--space-32);
}

.p-40 {
    padding: var(--space-40);
}

.p-48 {
    padding: var(--space-48);
}

.p-64 {
    padding: var(--space-64);
}

/* Padding X / Y */
.px-8 {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
}

.py-8 {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}

/* Margin */
.m-0 {
    margin: var(--space-0);
}

.m-2 {
    margin: var(--space-2);
}

.m-4 {
    margin: var(--space-4);
}

.m-6 {
    margin: var(--space-6);
}

.m-8 {
    margin: var(--space-8);
}

.m-10 {
    margin: var(--space-10);
}

.m-12 {
    margin: var(--space-12);
}

.m-16 {
    margin: var(--space-16);
}

.m-20 {
    margin: var(--space-20);
}

.m-24 {
    margin: var(--space-24);
}

.m-32 {
    margin: var(--space-32);
}

.m-40 {
    margin: var(--space-40);
}

.m-48 {
    margin: var(--space-48);
}

.m-64 {
    margin: var(--space-64);
}


/* Width */
.w-64 {
    width: var(--width-64);
}

.w-96 {
    width: var(--width-96);
}

.w-128 {
    width: var(--width-128);
}

.w-160 {
    width: var(--width-160);
}

.w-192 {
    width: var(--width-192);
}

.w-240 {
    width: var(--width-240);
}

.w-320 {
    width: var(--width-320);
}

.w-480 {
    width: var(--width-480);
}

.w-640 {
    width: var(--width-640);
}

.w-960 {
    width: var(--width-960);
}

.w-1280 {
    width: var(--width-1280);
}

.w-full {
    width: var(--width-full);
}

/* Height */
.h-32 {
    height: var(--height-32);
}

.h-48 {
    height: var(--height-48);
}

.h-64 {
    height: var(--height-64);
}

.h-80 {
    height: var(--height-80);
}

.h-96 {
    height: var(--height-96);
}

.h-128 {
    height: var(--height-128);
}

.h-160 {
    height: var(--height-160);
}

.h-240 {
    height: var(--height-240);
}

.h-320 {
    height: var(--height-320);
}

.h-full {
    height: var(--height-full);
}

/* Border Radius */

.radius-0 {
    border-radius: var(--radius-0);
}
.radius-2    { border-radius: var(--radius-2); }
.radius-4    { border-radius: var(--radius-4); }
.radius-6    { border-radius: var(--radius-6); }
.radius-8    { border-radius: var(--radius-8); }
.radius-12   { border-radius: var(--radius-12); }
.radius-16   { border-radius: var(--radius-16); }
.radius-full { border-radius: var(--radius-full); }

/* FONT SIZE CLASSES */
.font-10 {
    font-size: var(--font-10);
}

.font-12 {
    font-size: var(--font-12);
}

.font-14 {
    font-size: var(--font-14);
}

.font-16 {
    font-size: var(--font-16);
}

.font-18 {
    font-size: var(--font-18);
}

.font-20 {
    font-size: var(--font-20);
}

.font-24 {
    font-size: var(--font-24);
}

.font-28 {
    font-size: var(--font-28);
}

.font-32 {
    font-size: var(--font-32);
}

.font-40 {
    font-size: var(--font-40);
}

/* FONT WEIGHT CLASSES */
.fw-300 {
    font-weight: var(--font-300);
}

.fw-400 {
    font-weight: var(--font-400);
}

.fw-500 {
    font-weight: var(--font-500);
}

.fw-600 {
    font-weight: var(--font-600);
}

.fw-700 {
    font-weight: var(--font-700);
}

/*SHADOW CLASSES*/
.shadow-1 {
    box-shadow: var(--shadow-1);
}

.shadow-2 {
    box-shadow: var(--shadow-2);
}

.shadow-3 {
    box-shadow: var(--shadow-3);
}

/*TRANSITION CLASSES*/
.transition-fade {
    transition: opacity 0.3s ease;
}

.transition-slide {
    transition: transform 0.3s ease;
}

.transition-scale {
    transition: transform 0.3s ease;
}
.transition-150 {
    transition: var(--transition-150);
}

.transition-300 {
    transition: var(--transition-300);
}

.transition-500 {
    transition: var(--transition-500);
}

/*TEXT COLOR / BACKGROUND COLOR CLASSES/*/
.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.text-success {
    color: var(--color-success);
}

.text-danger {
    color: var(--color-danger);
}

.text-warning {
    color: var(--color-warning);
}

.text-info {
    color: var(--color-info);
}

.text-muted {
    color: var(--color-muted);
}

.bg-primary {
    background-color: var(--color-primary);
}

.bg-secondary {
    background-color: var(--color-secondary);
}

.bg-success {
    background-color: var(--color-success);
}

.bg-danger {
    background-color: var(--color-danger);
}

.bg-warning {
    background-color: var(--color-warning);
}

.bg-info {
    background-color: var(--color-info);
}

.bg-surface {
    background-color: var(--color-surface);
}

.bg-white {
    background-color: var(--color-white);
}


/*Z-INDEX CLASSES*/
.z-0 {
    z-index: var(--z-0);
}

.z-100 {
    z-index: var(--z-100);
}

.z-200 {
    z-index: var(--z-200);
}

.z-500 {
    z-index: var(--z-500);
}

.z-1000 {
    z-index: var(--z-1000);
}

.z-modal {
    z-index: var(--z-modal);
}

.z-toast {
    z-index: var(--z-toast);
}



/* Typography */
h1, .h1 {
    
    font-weight: 700;
    font-size: 2.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

h2, .h2 {
    
    font-weight: 600;
    font-size: 1.875rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h3, .h3 {
    
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

h4, .h4 {
    font-weight: 500;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

h5, .h5 {
    
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
}

p, .text-regular {
    
    font-weight: 400;
    font-size: 1rem;
    color: var(--text-secondary);
}

.text-semibold {
    
    font-weight: 600;
    font-size: 1rem;
}

.text-bold {
    
    font-weight: 700;
    font-size: 1rem;
}
.success-text {
    color: var(--success);
    
    font-weight: 600;
    font-size: 1.25rem;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
}

.btn-disabled {
    background-color: #00F5FF;
    color: black;
    cursor: not-allowed;
}

.btn-selected {
    background-color: #86a723;
    color: black;
}

.btn-default {
    background-color: #DEECF4;
    color: black;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

    .btn-primary:hover {
        background-color: #6d28d9;
        transform: translateY(-2px);
        box-shadow: 0 4px 6px var(--shadow-color);
    }

    .btn-primary:disabled {
        background-color: #d1d5db;
        cursor: not-allowed;
        transform: none;
    }

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

    .btn-secondary:hover {
        background-color: #e5e7eb;
        transform: translateY(-2px);
        box-shadow: 0 4px 6px var(--shadow-color);
    }

.btn-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background-color: var(--white);
}

.btn-button-text {
    flex-grow: 1;
    padding-right: 0.75rem;
}

.btn-button-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 2.5rem;
    height: 2rem;
    background-color: rgba(124, 58, 237, 0.1);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.btn-plus {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-plus:hover {
        background-color: #6d28d9;
        transform: translateY(-2px);
    }

/* Input field styles */
.input-field {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    
    font-size: 0.875rem;
    color: var(--text-primary);
    background-color: var(--white);
    width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
}

    .input-field:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    }

/* Checkbox styles */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--border);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

    .checkbox:checked {
        background-color: var(--primary);
        border-color: var(--primary);
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="white" d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg>');
        background-size: contain;
    }

/* Radio styles */
.radio-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.radio {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border);
    border-radius: 50%;
    background-color: var(--white);
    appearance: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .radio:checked::after {
        content: '';
        width: 0.75rem;
        height: 0.75rem;
        border-radius: 50%;
        background-color: var(--primary);
        position: absolute;
    }

.radio-label {
    
    font-size: 0.875rem;
    color: var(--label);
}

.radio-sublabel {
    
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Loader styles */
.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

    .loader svg {
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Row styles */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
}

/* DisplayText styles */
.display-text {
    
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.display-text-highlight {
    
    font-size: 0.875rem;
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}


/* Header */
.header {
    padding: 2.5rem;
    background-color: var(--primary);
    color: var(--white);
    text-align: center;
    border-radius: 0 0 1rem 1rem;
}

.heading-primary {
    color: var(--primary);
    text-align: center;
    margin-bottom: 30px;
}

.header-title {
    
    font-weight: 700;
    font-size: 2.25rem;
}

.header-subtitle {
    
    font-weight: 400;
    font-size: 1.125rem;
    opacity: 0.9;
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--rz-base-background-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    z-index: 1000;
}

/* Global container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}



@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tailwind-inspired classes for Index.razor */
.min-h-screen {
    min-height: 100vh;
}

.bg-gray-100 {
    background-color: var(--gray-100);
}

.flex {
    display: flex;
}
.flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.p-4 {
    padding: 1rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-bold {
    font-weight: 700;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.rounded-lg {
    border-radius: 0.75rem;
}

.p-6 {
    padding: 1.5rem;
}

.custom-welcome {
    
    font-weight: 700;
    color: var(--primary);
}

.custom-container {
    background-color: var(--white);
    box-shadow: 0 4px 6px var(--shadow-color);
    border-radius: 0.75rem;
}

.center-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--gray-100);
}

.full-width-screen {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-100);
    margin: 0;
    padding: 0; /* Optional: remove padding for true edge-to-edge */
}

@media (min-width: 640px) {
    .center-screen {
        padding: 1.5rem;
    }
}

@media (min-width: 768px) {
    .center-screen {
        padding: 2rem;
    }
}

/* Responsiveness */
@media (max-width: 1024px) {
    .sidebar {
        width: 100%;
        box-shadow: none;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }

        .sidebar[aria-hidden="false"] {
            left: 0;
        }

    .sidebar-toggle {
        display: block;
    }

    .content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    h1, .h1 {
        font-size: 1.875rem;
    }

    h2, .h2 {
        font-size: 1.5rem;
    }

    h3, .h3 {
        font-size: 1.25rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .input-field {
        padding: 0.625rem;
        font-size: 0.875rem;
    }

    .login-container {
        margin: 1.5rem;
        padding: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .max-w-2xl {
        max-width: 100%;
    }

    .row {
        flex-direction: column;
        gap: 0.75rem;
    }
}
.margin-top-20 {
    margin-top: 20px;
}

.text-box-bordered {
    border: 1px solid #d3d4d8;
    padding: 1.5%;
    height: 60px;
    overflow: auto;
}



@media (max-width: 576px) {
    h1, .h1 {
        font-size: 1.5rem;
    }

    h2, .h2 {
        font-size: 1.25rem;
    }

    .header {
        padding: 1.5rem;
    }

    .header-title {
        font-size: 1.75rem;
    }

    .btn-plus {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    .p-6 {
        padding: 1rem;
    }

    .login-container {
        margin: 1rem;
        padding: 1rem;
    }
}

.rz-dialog-side-titlebar-close,
.rz-dialog-titlebar-close {
    position: relative;
    cursor: pointer;
    padding: 0 4px;
}

    .rz-dialog-side-titlebar-close:hover,
    .rz-dialog-titlebar-close:hover {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 50%;
    }

    .rz-dialog-side-titlebar-close::after,
    .rz-dialog-titlebar-close::after {
        content: "Close";
        position: absolute;
        top: 120%; 
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.75);
        color: white;
        padding: 0px 10px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 9999; 
    }

    .rz-dialog-side-titlebar-close::before,
    .rz-dialog-titlebar-close::before {
        content: "";
        position: absolute;
        top: 110%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 5px;
        border-style: solid;
        border-color: black transparent transparent transparent;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .rz-dialog-side-titlebar-close:hover::after,
    .rz-dialog-side-titlebar-close:hover::before,
    .rz-dialog-titlebar-close:hover::after,
    .rz-dialog-titlebar-close:hover::before {
        opacity: 1;
    }
