/*!
 * Modified by Encrypted Software
 * Copyright 2023+
 * Licensed under written license, paid but MIT
 * - Dynamic color palette loading via CSS custom properties
 * - Primary and secondary color variants generated from base HEX values
 * - Font family overrides via CSS variables
 */
/*!
 * Bootstrap v5.1.3 (https://getbootstrap.com/)
 * Copyright 2011-2021 The Bootstrap Authors
 * Copyright 2011-2021 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
 */
.select2-selection {
    color: #69707a !important;
    margin: 0 !important;
    border: 1px solid #c5ccd6 !important;
    border-radius: 0.35rem !important;
    height: 3em !important;
}

.select2-selection__rendered {
    line-height: 1 !important;
}

.select2-selection__arrow {
    height: 3em !important;
}

.select2-dropdown {
    border: 1px solid #c5ccd6 !important;
    border-radius: 0.35rem !important;
}

.select2-search__field {
    border: 1px solid #c5ccd6 !important;
    border-radius: 0.35rem !important;
    height: 2em !important;
}

.select2-results__option--selected {
    border-radius: 0.35rem !important;
    color: var(--bs-primary) !important;
    background: #f2f6fc !important;
}

.select2-results__option--highlighted {
    background: var(--bs-primary) !important;
    color: #fff !important;
    border-radius: 0.35rem !important;
}
table.dataTable#datatable {
    margin-top: 1em;
    max-width: 100% !important;
}
.child,
.child:hover {
    background: #daf2f8 !important;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before {
    background-color: #00ac69 !important;
}

table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td.dtr-control:before {
    background-color: #f4a100 !important;
}

table.dataTable tbody tr.even {
    background: #f2f6fc;
}

table.dataTable tbody tr.even td {
    border-top: 1px solid #c5ccd6;
    border-bottom: 1px solid #c5ccd6;
}

table.dataTable thead {
    background: var(--bs-primary);
    color: white;
    border-radius: 0.5em;
}

table.dataTable tr:first-child th:first-child { border-top-left-radius: 0.5em; }
table.dataTable tr:first-child th:last-child { border-top-right-radius: 0.5em; }

table.dataTable tr:first-child th { border-top-style: solid; }
table.dataTable tr th:first-child { border-left-style: solid; }

table.dataTable tr:last-child td { border-bottom: 3px solid var(--bs-primary) !important; }

.dataTables_info#datatable_info,
.dataTables_filter,
.dataTables_length
{
    color: #c5ccd6 !important;
}

.dataTables_filter {
    margin-bottom: 1em;
}

.dataTables_filter input {
    display: inline-block;
    width: 12em;
    line-height: 1.2em;
}

.dataTables_paginate#datatable_paginate {
    color: var(--bs-primary);
}

.paginate_button.current:hover {
    background: #f2f6fc !important;
    border: 1px solid var(--bs-primary) !important;
    color: #fff !important;
}

.paginate_button.current {
    background: #f2f6fc !important;
    border: 1px solid #f2f6fc !important;
    border-radius: 0.5em !important;
}

.paginate_button.disabled:hover {
    background: transparent !important;
    border: 1px solid transparent !important;
}

.paginate_button:hover {
    background: var(--bs-primary) !important;
    border: 1px solid var(--bs-primary) !important;
    color: #fff !important;
    border-radius: 0.5em !important;
}

.toast-container {
    z-index: 9999;
    position: fixed;
    bottom: 1em;
    left: 1em;
}

.nav-wizard .nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.nav-wizard .nav-link.disabled .wizard-step-icon {
    background-color: #d4d4d8 !important;
}
.nav-wizard .nav-link.disabled .wizard-step-text-name {
    color: #71717a !important;
}

.toast-container {
    z-index: 9999;
    position: fixed;
    bottom: 1em;
    left: 1em;
}

/* Wizard Step Indicators */
.wizard-step-indicator {
    padding: 15px 10px;
    position: relative;
}

.wizard-step-indicator::after {
    content: '';
    position: absolute;
    top: 27px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: #e0e0e0;
    z-index: -1;
}

.wizard-step-indicator:last-child::after {
    display: none;
}

.wizard-step-indicator.active .wizard-step-number,
.wizard-step-indicator.completed .wizard-step-number {
    background-color: var(--bs-primary) ;
    color: white;
    box-shadow: 0 0 0 4px rgba(0, 97, 242, 0.1);
}

.wizard-step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.wizard-step-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.wizard-step-indicator.active .wizard-step-label,
.wizard-step-indicator.completed .wizard-step-label {
    color: var(--bs-primary) ;
    font-weight: 700;
}

/* Alert Icons */
.alert-icon {
    display: flex;
    align-items: flex-start;
}

.alert-icon-aside {
    font-size: 2rem;
    margin-right: 1rem;
}

.alert-icon-content {
    flex: 1;
}

/* Table enhancements */
.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 97, 242, 0.05);
    transform: scale(1.01);
}

/* Cards gradient effect */
.bg-gradient {
    background: linear-gradient(135deg, currentColor 0%, rgba(255,255,255,0.2) 100%);
}

@media (max-width: 768px) {
    .wizard-step-indicator::after {
        display: none;
    }

    .wizard-step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .wizard-step-label {
        font-size: 0.75rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Signature Pad Styling */
.signature-canvas-wrapper {
    position: relative;
    background-color: white;
    width:95%;
}

.signature-pad {
    width: 100%;
    height: 200px;
    cursor: crosshair;
    touch-action: none;
}

.signature-pad-container {
    position: relative;
}

/* Verdict Radio Buttons */
.form-check-input:checked {
    background-color: var(--bs-primary) ;
    border-color: var(--bs-primary) ;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

.form-check-input:disabled ~ .form-check-label {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .wizard-step-indicator::after {
        display: none;
    }

    .wizard-step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .wizard-step-label {
        font-size: 0.75rem;
    }

    .signature-pad {
        height: 150px;
    }
}

.wizard-step-indicator.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wizard-step-indicator.disabled .wizard-step-number,
.wizard-step-indicator.disabled .wizard-step-label {
    color: #999;
}

a:has(.wizard-step-indicator.disabled) {
    pointer-events: none;
}
