.unselectable1 {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Chrome/Safari/Opera */
  -khtml-user-select: none;    /* Konqueror */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Non-prefixed version, currently
}
.nowrap {
    white-space: nowrap; /* Запрет переноса текста */
}
#groups_menu {
  //position: fixed;
  height: 500px;
  overflow: auto;
}

.modal-open {
	min-width: 800px;
	overflow: auto;
	padding-right: 0;
}

body {
	overflow: auto !important;
}

.modal {
	overflow: auto !important;
}

body:is(.modal-open){
	min-width: 900px;
}

body:not(.modal-open){
  padding-right: 0px !important;
}

.modal {
    padding-right: 0px !important;
}

.modal-xl {
	min-width: 700px;
}

.tree, .tree ul {
    margin:0;
    padding:0;
    list-style:none
}
.tree ul {
    margin-left:1em;
    position:relative
}
.tree ul ul {
    margin-left:.5em
}
.tree ul:before {
    content:"";
    display:block;
    width:0;
    position:absolute;
    top:0;
    bottom:0;
    left:0;
    border-left:1px solid
}
.tree li {
    margin:0;
    padding:0 1em;
    line-height:1.5em;
    color:#000;
    font-weight:300;
	font-size: 0.9em;
    position:relative
}
.tree ul li:before {
    content:"";
    display:block;
    width:10px;
    height:0;
    border-top:1px solid;
    margin-top:-1px;
    position:absolute;
    top:1em;
    left:0
}
.tree ul li:last-child:before {
    background:#fff;
    height:auto;
    top:1em;
    bottom:0
}
.indicator {
    margin-right:5px;
}
.tree li a {
    text-decoration: none;
    color:#000;
}
.tree li button, .tree li button:active, .tree li button:focus {
    text-decoration: none;
    color:#000;
    border:none;
    background:transparent;
    margin:0px 0px 0px 0px;
    padding:0px 0px 0px 0px;
    outline: 0;
}

table.scroll table {
	display: inline-block;
	vertical-align: top;
	max-width: 100%;
	overflow-x: auto;
	white-space: nowrap;
	-webkit-overflow-scrolling: touch;
}
table.scroll tr,
table.scroll th { width:100%; }

table.scroll tbody,
table.scroll thead { display: block; }

table.scroll tbody {
    overflow-y: auto;
    overflow-x: hidden;
    width:100%;
}

.tbl_edt {
	width: 50px;
}

.loader {
	width: 287px;
    height: 141px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -125px 0 0 -125px;
	z-index: 9999;
    
    img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
        border: none;
    }
}

#chat-box {
    height: 400px;
    overflow-y: scroll;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
}

.emoji-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    margin-bottom: 10px;
}

.emoji {
    cursor: pointer;
    font-size: 20px;
}

.emoji:hover {
    transform: scale(1.2);
}

#message-input {
    resize: none; /* Отключаем изменение размера textarea */
    flex-grow: 1; /* Растягиваем textarea на всю доступную ширину */
}

.input-group {
    display: flex;
    align-items: stretch; /* Выравниваем элементы по высоте */
}
.tbl_edt {
	width:70px;
}
.dataTables_wrapper .btn-group {
	float: left;
}

.dataTables_wrapper .dataTables_filter {
	float: right;
}

.dataTables_wrapper .dataTables_length {
	float: left;
}
.dataTables_wrapper .dataTables_paginate {
	float: right;
}
.dataTables_wrapper .bottom {
  overflow: hidden;
  height: auto;
}

#table_invoices th:nth-last-child(-n+3),
#table_invoices td:nth-last-child(-n+3) {
    width: 80px;
    max-width: 80px;
    min-width: 80px;
}

#table_invoices .btn {
	width: 80px;
	margin: 2px;
}

.nowrap {
	text-wrap: nowrap;
}
.partial-invoice-item {
    background-color: #f8f9fa;
    border-left: 3px solid #28a745 !important;
}

.partial-invoice-item.paid {
    background-color: #d4edda;
    border-left-color: #155724 !important;
}
.app-card {
    transition: all 0.3s ease;
}

.app-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

.border-left-decoration {
    border-left: 4px solid #0d6efd !important;
}

.btn-group-xs .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.goods-table-actions {
    width: 80px;
}

.sort-input {
    width: 70px;
    text-align: center;
}

.modal-groups {
    max-height: 60vh;
    overflow-y: auto;
    font-size: 0.7rem;
}

.modal-goods {
    max-height: 60vh;
    overflow-y: auto;
    font-size: 0.7rem;
}

.table-goods tbody tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.table-goods tbody tr:hover {
    background-color: #f8f9fa;
}

.table-goods tbody tr.selected {
    background-color: #cfe2ff; /* Более насыщенный синий */
    outline: 2px solid #0d6efd; /* Синяя рамка */
    outline-offset: -2px;
}
.table-goods tbody tr.selected:hover {
    background-color: #b6d4fe; /* Ещё темнее при наведении */
}

.categories-list .list-group-item {
    border: none;
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
}

.categories-list .list-group-item:hover {
    background-color: #f8f9fa;
}

.categories-list .subcategory {
    padding-left: 1.2rem;
    font-size: 0.82rem;
}

.categories-list .subcategory-2 {
    padding-left: 2rem;
    font-size: 0.7rem;
    color: #6c757d;
}

.category-toggle {
    cursor: pointer;
}

.category-toggle:hover {
    color: #0d6efd;
}

.actions-sticky {
    position: sticky;
    bottom: 0;
    padding: 1rem 0;
    border-top: 1px solid #dee2e6;
    margin-top: 1rem;
}

.modal-groups .fas {
    font-size: 0.7rem;
}

#add_goods_list {
    font-size: 0.7rem;
}

#add_goods_list .btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

.modal-body .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.modal-body .col-md-4,
.modal-body .col-md-8 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.modal-goods .table thead th {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.modal-goods .table tbody td {
    padding: 0.3rem 0.5rem;
    vertical-align: middle;
}

#add_goods_list tr {
    line-height: 1.2;
}

.editable-cell {
    cursor: pointer;
    position: relative;
}

.editable-cell.editing {
    padding: 0 !important;
}

.editable-cell input {
    width: 100%;
    height: 100%;
    border: 2px solid #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    padding: 0.25rem;
    font-size: 0.875rem;
}

.error-row {
    background-color: #fff5f5 !important;
}

.error-cell {
    border: 2px solid #dc3545 !important;
}

/* Стили для уведомлений о сохранении */
.save-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.save-notification.hiding {
    animation: slideOutRight 0.3s ease-out;
}
#toggle-issued-status {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
#toggle-issued-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
#toggle-issued-status:active {
    transform: translateY(0);
}
#toggle-issued-status .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}
.gallery-container {
	padding: 0 5px;
}
.gallery-row {
	margin: 0 -2px;
}
.gallery-col {
    width: 300px;
    margin: 5px;
	position: relative;
}
.gallery-thumbnail {
    width: 100%;
    height: 168.75px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    transition: transform 0.2s;
}
.gallery-thumbnail:hover {
    transform: scale(1.03);
}
.delete-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border: none;
}
.delete-btn:hover {
    background-color: rgba(255, 0, 0, 0.9);
}
#toggle-event-type {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
#toggle-event-type:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
#toggle-event-type:active {
    transform: translateY(0);
}
#toggle-event-type .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}
.toast-container-custom {
    z-index: 1100;
}
.btn svg {
    vertical-align: -2px;
}
.btn-sm svg {
    vertical-align: -1px;
}
.app-btn-primary svg,
.btn-primary svg,
.btn-warning svg,
.btn-danger svg,
.btn-info svg,
.btn-light svg,
.btn-secondary svg {
    margin-right: 4px;
}
.result-container {
    background: #f8f9fa;
    animation: fadeIn 0.5s ease-out;
}
.result-title {
    color: #28a745;
    font-weight: 100;
    border-bottom: 1px solid #28a745;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.result-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #dee2e6;
}
.result-label {
    font-weight: 100;
    color: #495057;
    display: block;
}
.result-value {
    color: #212529;
    font-weight: 500;
    display: block;
}
.app-btn-primary {
    background-color: green;
    border-color: green;
}
.app-btn-primary:hover {
    background-color: darkgreen;
    border-color: darkgreen;
}