/*
 * Theme-neutral Starter Kit CSS contract.
 * Visual layout and component styles belong to the active theme assets.
 */

[x-cloak] {
    display: none !important;
}

/* Brand images retain their supplied aspect ratio in either navigation layout. */
[data-starter-app-shell] [data-starter-brand-logo] {
    block-size: 2.5rem;
    inline-size: auto;
    max-inline-size: 11.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

.starter-client-logo-preview.starter-favicon-preview {
    block-size: 5rem;
    inline-size: 5rem;
}

:root {
    --starter-auth-backdrop-image: url('../images/auth-backdrop-enterprise.webp?v=2');
}

/* Shared full-bleed auth backdrop. Hosts can replace the CSS variable with their own asset. */
.starter-auth-backdrop-panel {
    min-block-size: 100dvh;
    overflow: hidden;
    position: relative;
}

.starter-auth-backdrop {
    background-color: #071329;
    background-image:
        linear-gradient(135deg, rgba(4, 12, 31, .18), rgba(4, 12, 31, .38)),
        var(--starter-auth-backdrop-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    block-size: 100%;
    inline-size: 100%;
    min-block-size: 100dvh;
}

.starter-tabler-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(26rem, .85fr);
    min-block-size: 100dvh;
}

.starter-tabler-auth-form {
    align-items: center;
    background: var(--tblr-bg-surface, #fff);
    display: flex;
    justify-content: center;
    min-block-size: 100dvh;
    overflow-y: auto;
    padding: 2rem;
}


@media (min-width: 1024px) {
    .dashcode-auth .loginwrapper .lg-inner-column {
        display: grid;
        grid-template-columns: minmax(0, 3fr) minmax(26rem, 2fr);
    }

    .dashcode-auth .loginwrapper .left-column,
    .dashcode-auth .loginwrapper .right-column {
        min-inline-size: 0;
    }
}

@media (max-width: 991.98px) {
    .starter-tabler-auth-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .starter-tabler-auth-form {
        padding: 1rem;
    }
}

/* Keep password validation legible when a visibility toggle owns the input edge. */
.starter-password-field .form-control.is-invalid {
    background-image: none !important;
}

.starter-password-field:has(.form-control.is-invalid) .starter-password-toggle {
    border-color: var(--bs-form-invalid-border-color, var(--tblr-form-invalid-border-color, #dc3545)) !important;
}

.starter-password-error {
    display: block !important;
}

.starter-password-error > div + div {
    margin-top: .2rem;
}

/* Keep the challenge compact while its security texture fills the available row. */
.starter-human-challenge-visual {
    align-items: center;
    display: flex;
    isolation: isolate;
    justify-content: center;
    position: relative;
}

.starter-human-challenge-visual::before {
    background-image:
        linear-gradient(166deg, transparent 44%, rgba(100, 116, 139, .18) 44.5%, rgba(100, 116, 139, .18) 45%, transparent 45.5%),
        linear-gradient(12deg, transparent 56%, rgba(148, 163, 184, .16) 56.5%, rgba(148, 163, 184, .16) 57%, transparent 57.5%),
        linear-gradient(177deg, transparent 67%, rgba(100, 116, 139, .12) 67.5%, rgba(100, 116, 139, .12) 68%, transparent 68.5%);
    content: '';
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.starter-human-challenge-visual > img {
    max-width: 100%;
    position: relative;
    z-index: 1;
}

/* Universal page-navigation loader. It is intentionally theme-neutral. */
.starter-navigate-loader {
    align-items: center;
    background: rgba(241, 245, 249, .86);
    bottom: var(--starter-loader-bottom, 0);
    display: flex;
    flex-direction: column;
    justify-content: center;
    left: var(--starter-loader-left, 0);
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: var(--starter-loader-right, 0);
    top: var(--starter-loader-top, 0);
    transition: opacity .14s ease;
    z-index: 1200;
}

.starter-navigate-loader-panel {
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .625rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
    color: #1e293b;
    display: flex;
    gap: .875rem;
    max-width: calc(100vw - 2rem);
    min-width: 14rem;
    padding: 1rem 1.125rem;
}

.starter-navigate-spinner {
    animation: starter-navigate-spin .75s linear infinite;
    border: 2px solid #cbd5e1;
    border-radius: 999px;
    border-top-color: #465ff1;
    flex: 0 0 auto;
    height: 1.5rem;
    width: 1.5rem;
}

.starter-navigate-loader-copy {
    display: flex;
    flex-direction: column;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    line-height: 1.25;
}

.starter-navigate-loader-copy strong { font-size: .875rem; font-weight: 600; }
.starter-navigate-loader-copy span { color: #64748b; font-size: .75rem; margin-top: .2rem; }

.starter-navigate-progress {
    background: #e2e8f0;
    border-radius: 999px;
    display: block;
    height: .2rem;
    margin-top: .625rem;
    overflow: hidden;
    width: 12rem;
}

.starter-navigate-progress > span {
    animation: starter-navigate-progress 1.15s ease-in-out infinite;
    background: #465ff1;
    display: block;
    height: 100%;
    width: 42%;
}

body.starter-is-navigating .starter-navigate-loader {
    opacity: 1;
    pointer-events: auto;
}

body.starter-is-navigating .starter-slot-area > [wire\:id] {
    filter: blur(2px);
    opacity: .55;
    pointer-events: none;
}

body.starter-is-navigating:has([data-cms-content-page]) .starter-slot-area > [wire\:id] {
    filter: none;
    opacity: 1;
}

body.starter-is-navigating:has([data-cms-content-page]) .starter-navigate-loader {
    align-items: stretch;
    background: transparent;
    bottom: auto;
    height: 3px;
    pointer-events: none;
}

body.starter-is-navigating:has([data-cms-content-page]) .starter-navigate-loader-panel {
    display: none;
}

body.starter-is-navigating:has([data-cms-content-page]) .starter-navigate-progress {
    border-radius: 0;
    height: 3px;
    margin: 0;
    width: 100%;
}

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

@keyframes starter-navigate-progress {
    from { transform: translateX(-110%); }
    to { transform: translateX(250%); }
}

@media (prefers-reduced-motion: reduce) {
    .starter-navigate-loader { transition: none; }
    .starter-navigate-spinner,
    .starter-navigate-progress > span { animation: none; }
}

/* Shared crop geometry; modal surfaces and controls retain the active theme. */
.starter-brand-crop-modal.modal {
    align-items: center;
    background: rgba(15, 23, 42, .5);
    display: flex;
    inset: 0;
    overflow: auto;
    padding: 1rem;
    position: fixed;
    z-index: 2100;
}
.starter-brand-crop-modal .modal-dialog { margin: auto; max-inline-size: 32rem; inline-size: 100%; }
.starter-brand-crop-modal .modal-content { max-block-size: calc(100dvh - 2rem); overflow: auto; }
.starter-brand-crop-modal.modal.starter-native-backdrop { background: transparent; }
.starter-brand-crop-modal.modal.dashcode-crop-modal { background: rgba(15, 23, 42, .46); }
.starter-notification-choice { align-items: stretch; display: flex; flex-wrap: wrap; gap: .5rem; }
.starter-notification-choice > .form-control { flex: 1 1 12rem; min-width: 0; width: auto; }
.starter-notification-choice > .btn { flex: none; }
.starter-notification-choice + .invalid-feedback { display: block; }
.starter-brand-crop-body { display: grid; gap: .5rem; min-inline-size: 0; }
.starter-brand-crop-body p { margin: 0 0 .25rem; }
.starter-brand-crop-body .form-label { margin: 0; }
.starter-brand-crop-body input[type="range"] { inline-size: 100%; accent-color: var(--starter-brand-primary, var(--tblr-primary, var(--bs-primary, var(--starter-primary, auto)))); }
.starter-brand-crop-canvas {
    background: repeating-conic-gradient(#e2e8f0 0% 25%, #fff 0% 50%) 50% / 16px 16px;
    display: block;
    inline-size: 100%;
    max-block-size: 15rem;
    object-fit: contain;
    touch-action: none;
    cursor: grab;
}
.starter-brand-crop-canvas[width="256"] { inline-size: min(100%, 15rem); justify-self: center; }
.starter-brand-crop-fit { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .25rem; }
