.editable-div {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    overflow-y: auto;
    margin: 10px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.variableGray {
    background-color: #d3d3d3;
    color: #000;
    border-radius: 10px;
    padding: 0.2em 0.4em;
}

.variableRed {
    background-color: #ffcccc;
    color: #000;
    border-radius: 10px;
    padding: 0.2em 0.4em;
}

.monaco-editor-container { /* for all editor instances */
    height: 35rem;
}

/* Blazor Server Reconnect UI */
#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

#components-reconnect-modal .show,
#components-reconnect-modal .failed,
#components-reconnect-modal .rejected {
    display: none;
}

/* Visibility Logic - Higher priority states override lower ones */

/* 1. Rejected (Terminal state) */
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}
#components-reconnect-modal.components-reconnect-rejected .rejected {
    display: block;
}
#components-reconnect-modal.components-reconnect-rejected .show,
#components-reconnect-modal.components-reconnect-rejected .failed {
    display: none !important;
}

/* 2. Failed (Retry state) - Only if not rejected */
#components-reconnect-modal.components-reconnect-failed:not(.components-reconnect-rejected) {
    display: flex;
}
#components-reconnect-modal.components-reconnect-failed:not(.components-reconnect-rejected) .failed {
    display: block;
}
#components-reconnect-modal.components-reconnect-failed:not(.components-reconnect-rejected) .show {
    display: none !important;
}

/* 3. Show (Attempting) - Only if not failed and not rejected */
#components-reconnect-modal.components-reconnect-show:not(.components-reconnect-failed):not(.components-reconnect-rejected) {
    display: flex;
}
#components-reconnect-modal.components-reconnect-show:not(.components-reconnect-failed):not(.components-reconnect-rejected) .show {
    display: block;
}

/* Hide overrides everything else */
#components-reconnect-modal.components-reconnect-hide {
    display: none !important;
}

#components-reconnect-modal .reconnect-modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
}

#components-reconnect-modal .reconnect-modal-content p {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1rem;
}

/* Spinner animation */
.reconnect-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7e57c2;
    border-radius: 50%;
    animation: reconnect-spin 1s linear infinite;
}

@keyframes reconnect-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Buttons */
.reconnect-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border: none;
    border-radius: 4px;
    background-color: #7e57c2;
    color: #fff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reconnect-button:hover {
    background-color: #5e35b1;
}

/* Bootstrap-compat utilities (previously provided by tailwind-input.css) */
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.text-end { text-align: end; }
/* Image-order select: keep the collapsed selected value tall enough for the thumbnail */
.image-order-select .mud-input-slot,
.image-order-select .mud-select-input {
    height: auto;
    min-height: 56px;
    display: flex;
    align-items: center;
}
