/* Do & Dough Admin - Global Styles */

* {
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F5FEFF;
    color: #205A61;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    color: #205A61;
}

h1:focus {
    outline: none;
}

a {
    color: #2D7D87;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #205A61;
    text-decoration: underline;
}

/* Selection */
::selection {
    background: #C2F9FF;
    color: #205A61;
}

/* Smooth transitions globally */
*, *::before, *::after {
    transition-property: background-color, border-color, box-shadow;
    transition-duration: 0s;
}

/* Form Validation */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid #10B981;
}

.invalid {
    outline: 2px solid #EF4444;
}

.validation-message {
    color: #EF4444;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: #FEE2E2;
    color: #DC2626;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    left: 0;
    padding: 12px 20px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    display: none;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 16px;
    top: 12px;
}

#blazor-error-ui .reload {
    color: #DC2626;
    font-weight: 600;
    margin-left: 8px;
}

.blazor-error-boundary {
    background: #EF4444;
    padding: 16px 20px;
    color: white;
    border-radius: 8px;
    margin: 16px;
}

.blazor-error-boundary::after {
    content: "An error has occurred. Please refresh the page.";
}

/* Loading Spinner */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #205A61 0%, #2D7D87 50%, #3AA0AD 100%);
    color: white;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Code Styling */
code {
    background: #F5FEFF;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #205A61;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #F5FEFF;
}

::-webkit-scrollbar-thumb {
    background: #C2F9FF;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3AA0AD;
}
