/* OneByte MerchApp - Global CSS */

html,
body {
    font-family: 'Inter', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background-color: #F5F7FA;
}

#blazor-error-ui {
    background: #ffecb3;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Loading Progress - Modern Spinner Integration */
.loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;
    gap: 1.5rem;
}

.loading-logo {
    width: 180px;
    margin-bottom: 1rem;
}

.loading-progress {
    width: 250px;
    height: 4px;
    background-color: rgba(13, 27, 84, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-progress::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--blazor-load-percentage, 0%);
    background-color: #0D1B54;
    transition: width 0.3s ease-out;
}

.loading-text {
    font-size: 0.825rem;
    font-weight: 500;
    color: #4A5568;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
}

.loading-dots::after {
    content: '.';
    animation: dots 1.5s steps(5, end) infinite;
    display: inline-block;
    width: 1.5em;
    text-align: left;
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60% {
        content: '...';
    }

    80%,
    100% {
        content: '';
    }
}

/* Custom Scrollbar for modern look */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* --- OneByte Design System - Dialogs --- */
.mud-dialog {
    border-radius: 4px !important;
    overflow: hidden;
    box-shadow: var(--mud-elevation-8) !important;
}

.mud-dialog-title {
    background-color: #0D1B54 !important;
    color: white !important;
    padding: 12px 24px !important;
}

.mud-dialog-title .mud-typography {
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1rem !important;
}

/* Close button in dialog title (if any) */
.mud-dialog-title .mud-icon-button {
    color: white !important;
}

.mud-dialog-content {
    background-color: white !important;
    padding: 24px !important;
}

.mud-dialog-actions {
    background-color: #F8FAFC !important;
    padding: 12px 24px !important;
    border-top: 1px solid var(--mud-palette-divider);
    justify-content: flex-end !important;
}

/* --- OneByte Design System - Forms & Inputs --- */
.mud-input-outlined {
    border-radius: 4px !important;
}

.mud-input-outlined.mud-input-outlined-focused .mud-input-outlined-border {
    border-color: #0D1B54 !important;
    border-width: 2px !important;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #1E3A8A !important;
}

.mud-input-label-outlined.mud-input-label-outlined-focused {
    color: #0D1B54 !important;
}

.mud-select .mud-select-input {
    border-radius: 4px !important;
}

/* Buttons inside dialogs or general */
.mud-button-filled.mud-button-filled-primary {
    background-color: #0D1B54 !important;
    border-radius: 4px !important;
}

.mud-button-filled.mud-button-filled-primary:hover {
    background-color: #1E3A8A !important;
}