/* Styled error messages */
.errorlist,
.text-red-500 {
    background-color: rgba(220, 38, 38, 0.1) !important;
    border-left: 3px solid #DC2626 !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.25rem !important;
    margin-top: 0.5rem !important;
    font-weight: 500 !important;
    color: white !important;
}

.dark .errorlist,
.dark .text-red-500 {
    background-color: rgba(220, 38, 38, 0.15) !important;
    border-left-color: #EF4444 !important;
}


.underline-on-hover:hover {
    text-decoration: underline;
    color: white;
}


.sidebar-custom {
    background-color: #1a202c;
}

.sidebar-custom-text {
    color: #a0aec0;
}

.sidebar-custom-text-active {
    color: #ffffff;
}

.sidebar-custom .submenu-custom {
    background-color: rgba(0, 0, 0, 0.2);
}

.sidebar-custom a:not(.bg-purple-600):hover {
    background-color: #4a5568;
    color: #ffffff !important;
}

.sidebar-custom a:not(.bg-purple-600):hover svg {
    color: #ffffff !important;
}

.dropdown-panel {
    background-color: #0F172A;
    border: 1px solid #4A5568;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

/* Hide number input spinners */
.screen-type-menu-no-spinner::-webkit-outer-spin-button,
.screen-type-menu-no-spinner::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.screen-type-menu-no-spinner {
    -moz-appearance: textfield;
    appearance: textfield;
}

.screen-type-menu-section-first {
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
}

/* Middle section(s): balanced top and bottom */
.screen-type-menu-section-middle {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.screen-type-menu-section-last {
    padding-top: 1.5rem;
    padding-bottom: 3.5rem;
}

#screen-type-menu-screens-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    width: 100% !important;
}

#screen-type-menu-screens-grid:has(.screen-type-menu-screen-item:only-child) {
    grid-template-columns: 1fr !important;
}

#screen-type-menu-screens-grid.single-screen {
    grid-template-columns: 1fr !important;
}

.screen-type-menu-screen-item {
    display: flex;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 1rem 1.25rem !important;
}
.screen-type-menu-screen-item > .shrink-0:first-child {
    margin-right: 0.75rem !important;
}

.screen-type-menu-screen-item .flex-1 p:first-child {
    margin-bottom: 0.25rem !important;
}
.screen-type-menu-screen-item input[type="checkbox"] {
    width: 1.50rem !important;
    height: 1.50rem !important;
}

.screen-type-menu-hidden-screen-item {
    display: none !important;
}


@keyframes flash-correction {
    0%, 100% {
        color: rgb(156, 163, 175);
        font-size: 0.75rem;
    }
    50% {
        color: rgb(239, 68, 68);
        font-weight: 600;
        font-size: 0.875rem;
    }
}

.flash-correction {
    animation: flash-correction 0.8s ease-in-out 5;
}

.dark .flash-correction {
    animation: flash-correction-dark 0.8s ease-in-out 5;
}

@keyframes flash-correction-dark {
    0%, 100% {
        color: rgb(107, 114, 128);
        font-size: 0.75rem;
    }
    50% {
        color: rgb(248, 113, 113);
        font-weight: 600;
        font-size: 0.875rem;
    }
}

.layout-config-group {
    margin-top: 2rem;
}