/* Global styles for OptionsPlay Widgets Demo */

:root {
    --op-primary-color: #0078d4;
    --op-secondary-color: #5c5c5c;
    --op-background-color: #f5f5f5;
    --op-text-color: #333333;
    --op-border-color: #e8e8e8;
    --op-success-color: #107c10;
    --op-error-color: #a4262c;
    --op-border-radius: 4px;
}

html, body {
    font-family: 'Noto Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--op-background-color);
    color: var(--op-text-color);
}

/* Loading spinner */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--op-primary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: var(--op-secondary-color);
    font-size: 1.2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Blazor error UI */
#blazor-error-ui {
    background-color: var(--op-error-color);
    color: white;
    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;
}

#blazor-error-ui a {
    color: white;
    text-decoration: underline;
    margin: 0 10px;
}

/* Demo pages common styles */
h1 {
    color: var(--op-primary-color);
    margin-bottom: 1.5rem;
}

h2 {
    color: var(--op-primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Demo container styles */
.demo-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
    max-width: 600px;
}

.demo-controls {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
}

.control-group select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--op-border-color);
    width: 200px;
}

.demo-code {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.demo-code h3 {
    margin-top: 0;
}

.demo-code pre {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
}

.demo-code code {
    font-family: 'Courier New', Courier, monospace;
}