html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.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 #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.highlight {
    background-color: #90913838 !important;
    transition: background-color 1s ease-in-out;
}

.highlight-error {
    background-color: red !important; /* Light yellow */
    transition: background-color 0.5s ease;
}

.highlight-delete {
    background-color: #d92f2f57 !important; /* Light red */
    transition: background-color 0.5s ease;
}

@keyframes flash {
    from {
        background-color: #ffffff;
    }

    to {
        background-color: #ffffff;
    }
}





.select2-results .select2-result-label {
    /*padding: 10px !important;*/
    line-height: 1.6 !important;
}

.select2-drop .select2-results {
    /*max-height: 400px !important;*/ /* Increase this value to make the scrollable area taller */
    overflow-y: auto !important; /* Ensure scrolling is visible if content exceeds max-height */
}

.hierarchical-access-rights-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.datagrid {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d1d5db;
}

    .datagrid thead {
        background-color: #f8f9fa;
    }

    .datagrid th {
        padding: 12px 16px;
        text-align: left;
        font-weight: 600;
        color: #374151;
        border: 1px solid #d1d5db;
        font-size: 14px;
        text-align: center;
    }

        .datagrid th:first-child {
            /*text-align: left;*/
        }

    .datagrid tbody tr {
        transition: background-color 0.2s;
    }

        .datagrid tbody tr:hover {
            background-color: #f9fafb;
        }

    .datagrid td {
        padding: 12px 16px;
        vertical-align: middle;
        border: 1px solid #e5e7eb;
    }

.row-content {
    display: flex;
    align-items: center;
}

.expand-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

    .expand-icon:hover {
        background-color: #e5e7eb;
    }

    .expand-icon svg {
        width: 16px;
        height: 16px;
        fill: #6b7280;
        transition: transform 0.2s;
    }

    .expand-icon.expanded svg {
        transform: rotate(90deg);
    }

.rights-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-direction: column;
}

.rights-slider {
    width: 150px;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

    .rights-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: white;
        border: 3px solid;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    .rights-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: white;
        border: 3px solid;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    .rights-slider.level-0 {
        background: linear-gradient(to right, #ef4444 0%, #ef4444 100%);
    }

        .rights-slider.level-0::-webkit-slider-thumb {
            border-color: #ef4444;
        }

        .rights-slider.level-0::-moz-range-thumb {
            border-color: #ef4444;
        }

    .rights-slider.level-1 {
        background: linear-gradient(to right, #f59e0b 0%, #f59e0b 50%, #f59e0b 100%);
    }

        .rights-slider.level-1::-webkit-slider-thumb {
            border-color: #f59e0b;
        }

        .rights-slider.level-1::-moz-range-thumb {
            border-color: #f59e0b;
        }

    .rights-slider.level-2 {
        background: linear-gradient(to right, #10b981 0%, #10b981 50%, #10b981 100%);
    }

        .rights-slider.level-2::-webkit-slider-thumb {
            border-color: #10b981;
        }

        .rights-slider.level-2::-moz-range-thumb {
            border-color: #10b981;
        }

.rights-label {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    min-width: 120px;
    text-align: center;
}

.level-0-bar, .level-0-label {
    background-color: #ef4444;
}

.level-1-bar, .level-1-label {
    background-color: #f59e0b;
}

.level-2-bar, .level-2-label {
    background-color: #10b981;
}

.child-row {
    display: none;
}

.parent-expanded .child-row {
    display: table-row;
}

[dir="ltr"] .row-name {
    font-weight: 500;
    color: #1f2937;
    border-left: 1px solid #d5d5d585;
    padding-left: 10px;
}

[dir="rtl"] .row-name {
    font-weight: 500;
    color: #1f2937;
    border-right: 1px solid #d5d5d585;
    padding-right: 10px;
}

.legend {
    padding: 16px;
    background-color: #f8f9fa;
    border-top: 1px solid #e5e7eb;
}

.legend-title {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.legend-items {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.info-panel {
    padding: 16px;
    background-color: #eff6ff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.info-text {
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 4px;
}

.config-panel {
    padding: 16px;
    background-color: #f0f9ff;
    border-bottom: 1px solid #e5e7eb;
}

.config-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 8px;
}

.config-textarea {
    width: 100%;
    height: 120px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    resize: vertical;
}

.level-indicator {
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
}

.config-buttons {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.config-button {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .config-button.primary {
        background-color: #3b82f6;
        color: white;
    }

        .config-button.primary:hover {
            background-color: #2563eb;
        }

    .config-button.secondary {
        background-color: #e5e7eb;
        color: #374151;
    }

        .config-button.secondary:hover {
            background-color: #d1d5db;
        }

.no-select {
    user-select: none;
}
