/* Import StockCraft Brand Theme */
@import url('theme.css');
@import url('components.css');
@import url('responsive.css');

html,
body {
    font-family: var(--brand-font-family);
    line-height: var(--brand-line-height);
}

h1:focus {
    outline: none;
}

a,
.btn-link {
    color: var(--brand-primary);
}

.btn-primary {
    color: #fff;
    background: var(--brand-gradient);
    border: none;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(249, 115, 22, 0.5);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Improved Blazor Error UI - Modal Style */
#blazor-error-ui {
    background: rgba(0, 0, 0, 0.5);
    bottom: 0;
    box-shadow: none;
    display: none;
    left: 0;
    padding: 0;
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

/* Ensure the error UI uses flexbox when visible to center content */
#blazor-error-ui[style*="display: block"],
#blazor-error-ui[style*="display: flex"] {
    display: flex !important;
}

#blazor-error-ui .dismiss {
    display: none;
    /* Use our custom dismiss button inside the content */
}

#blazor-error-ui .reload {
    display: none;
    /* Use our custom reload button inside the content */
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCN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yNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--brand-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}



/* App Loading Screen */
.app-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.app-loading-spinner {
    width: 80px;
    height: 80px;
    animation: app-spin 1s linear infinite;
}

.app-loading-text {
    margin-top: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #F97316;
    font-weight: 600;
}

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

/* Layout Utilities */
.page-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Home Page Styles */
.hero-section {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.hero-title {
    margin: 0;
    color: white;
    font-size: 1.75rem;
}

.hero-subtitle {
    margin: 0.25rem 0 0 0;
    color: white;
}

/* Utilities */
.cursor-pointer {
    cursor: pointer;
}

.search-container {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

/* Chips & Badges */
.theme-chip {
    transition: transform 0.2s ease;
}

.theme-chip:hover {
    transform: translateY(-1px);
}

.status-badge {
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Snackbar Positioning Override */
.mud-snackbar-location-top-right,
.mud-snackbar-location-top-left,
.mud-snackbar-location-top-center {
    top: 80px !important;
}

/* Hide craft category description in the input field selection */
.craft-category-select .craft-category-description {
    display: none !important;
}

/* Remove padding from the input slot to prevent leakage artifacts */
.craft-category-select .mud-input-slot {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Hide reCAPTCHA badge globally */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* Quill Editor Dark Mode Styles */
.quill-editor-dark {
    background: var(--neutral-fill-input-rest, #2a2a2a) !important;
    border: 1px solid var(--neutral-stroke-rest, #444) !important;
    border-radius: 4px;
}

/* Quill toolbar dark mode */
.quill-editor-dark .ql-toolbar {
    background: var(--neutral-fill-rest, #1e1e1e) !important;
    border-color: var(--neutral-stroke-rest, #444) !important;
    border-radius: 4px 4px 0 0;
}

/* Quill toolbar buttons */
.quill-editor-dark .ql-toolbar button,
.quill-editor-dark .ql-toolbar .ql-picker-label {
    color: var(--text-primary, #e0e0e0) !important;
}

.quill-editor-dark .ql-toolbar button:hover,
.quill-editor-dark .ql-toolbar .ql-picker-label:hover {
    background: var(--neutral-fill-secondary-hover, #3a3a3a) !important;
}

.quill-editor-dark .ql-toolbar button.ql-active,
.quill-editor-dark .ql-toolbar .ql-picker-label.ql-active {
    background: var(--accent-fill-rest, #f97316) !important;
    color: white !important;
}

/* Quill toolbar icons */
.quill-editor-dark .ql-stroke {
    stroke: var(--text-primary, #e0e0e0) !important;
}

.quill-editor-dark .ql-fill {
    fill: var(--text-primary, #e0e0e0) !important;
}

.quill-editor-dark .ql-picker-options {
    background: var(--neutral-fill-rest, #1e1e1e) !important;
    border-color: var(--neutral-stroke-rest, #444) !important;
}

.quill-editor-dark .ql-picker-item {
    color: var(--text-primary, #e0e0e0) !important;
}

.quill-editor-dark .ql-picker-item:hover {
    background: var(--neutral-fill-secondary-hover, #3a3a3a) !important;
}

/* Quill editor content area - light background for editing visibility */
.quill-editor-dark .ql-editor {
    background: var(--neutral-fill-input-rest, #2a2a2a) !important;
    color: var(--text-primary, #e0e0e0) !important;
    border-color: var(--neutral-stroke-rest, #444) !important;
}

/* Placeholder text */
.quill-editor-dark .ql-editor.ql-blank::before {
    color: var(--text-hint, #888) !important;
}

/* Ensure content formatting is visible in dark mode */
.quill-editor-dark .ql-editor h1,
.quill-editor-dark .ql-editor h2,
.quill-editor-dark .ql-editor h3 {
    color: var(--text-primary, #e0e0e0) !important;
}

.quill-editor-dark .ql-editor a {
    color: var(--accent-fill-rest, #f97316) !important;
}

/* Keep the snow theme border */
.quill-editor-dark .ql-container {
    border-color: var(--neutral-stroke-rest, #444) !important;
}

/* Search Blur Effect */
.search-blur-effect {
    filter: blur(5px) grayscale(0.2);
    transition: filter 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    user-select: none;
    opacity: 0.8;
}