/* =========================================================
   SoftCon App CSS
   Purpose:
   - Blazor-specific behavior
   - Application shell layout
   - Application-specific components
   - Interaction states
   ========================================================= */


/* Blazor focus behavior */
h1:focus {
    outline: none;
}


/* Blazor validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--bs-success);
}

.invalid {
    outline: 1px solid var(--bs-danger);
}

.validation-message {
    color: var(--bs-danger);
}


/* Blazor error boundary */
.blazor-error-boundary {
    background-color: var(--bs-danger);
    padding: 1rem;
    color: var(--bs-white);
    border-radius: var(--bs-border-radius);
}

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


/* Shell header */
.shell-navbar {
    background-color: var(--sc-shell-navbar-bg);
    border-bottom: 1px solid var(--sc-shell-navbar-border);
    padding: 0.5rem 1rem;
}

    .shell-navbar .navbar-brand {
        font-weight: 600;
        color: var(--sc-shell-brand-color);
        text-decoration: none;
    }


/* Optional resizable splitter component */
.resizable-container {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0;
}

.resizable-left,
.resizable-right {
    overflow: auto;
    padding: 0 0.75rem;
    min-width: 20%;
    max-width: 80%;
}

.resizable-splitter {
    width: 8px;
    background-color: var(--bs-secondary-bg);
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    user-select: none;
    transition: background-color 0.2s ease-in-out;
}

    .resizable-splitter:hover {
        background-color: var(--bs-primary);
    }

    .resizable-splitter:active {
        background-color: var(--bs-primary-text-emphasis);
    }

.splitter-line {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background-color: var(--bs-secondary-color);
    border-radius: 2px;
}

.resizable-splitter:hover .splitter-line {
    background-color: var(--bs-white);
}


/* Prevent text selection while dragging */
body.resizing {
    user-select: none;
    cursor: col-resize !important;
}

    body.resizing * {
        cursor: col-resize !important;
    }
