/* Стили для модального окна */
#preorder-modal {
    display: none; /* По умолчанию скрыто */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Темный фон */
    z-index: 9999; /* Обеспечивает, что окно будет поверх всего контента */
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

#edit-order-button {
	float: right;
}

.wc-backbone-modal .wc-backbone-modal-content {
    position: fixed;
    background: #fff;
    z-index: 100000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    max-width: 100%;
    min-width: 500px;
	max-height: 90vh; 
    overflow: hidden;
}

/* Закрытие модального окна */
.modal-close {
    /*position: absolute;
    top: 10px;
    right: 10px;*/
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #000;
}

/* Стили для заголовка модального окна */
/*.wc-backbone-modal-header {
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
	margin-top: 10px;*/
.wc-backbone-modal-main .wc-backbone-modal-header {
	position: sticky;
    top: 0;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
	margin-bottom: 10px;
	height: auto;
    background: #fcfcfc;
    padding-left: 10px;
    border-bottom: 1px solid #ddd;
}

.wc-backbone-modal-header mark {
    font-weight: normal;
    background-color: #f5f5f5;
    padding: 6px 14px;
    border-radius: 4px;
}

/* Для картинки товара в модальном окне */
#modal-order-image {
    max-width: 100%; /* Ограничиваем ширину */
    height: auto;
    /*margin-bottom: 20px;*/
    border-radius: 5px;
}

/* Стили для таблицы товаров в модальном окне */
#modal-order-items {
    width: 100%;
    border-collapse: collapse;
}

#modal-order-items th, #modal-order-items td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#modal-order-items th {
    background-color: #f2f2f2;
}

/* Кнопки в модальном окне */
button {
    background-color: #2271b1;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
button.media-menu-item  {
	color: #282828;
}
/*
button:hover {
    background-color: #1a5f91;
}
*/
/* Для фона, чтобы убрать выделение вокруг модального окна */
.wc-backbone-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background-color: rgba(0, 0, 0, 0.7);*/
    z-index: 9998;
}
.preorder-image {
	width: 50%;
    margin: 0 auto;
}

/* Увеличиваем шрифт для названия раздела и делаем первую букву заглавной */
.order-section-header {
    font-size: 1.2em; 
    text-transform: capitalize; /* Первая буква в каждом слове будет заглавной */
    font-weight: bold;
    margin-bottom: 10px; 
}
.order-status {
	text-transform: capitalize;
}

.wc-backbone-modal-main .wc-backbone-modal-header .modal-close-link {
    cursor: pointer;
    color: #777;
    height: 54px;
    width: 54px;
    padding: 0;
    /*position: absolute;*/
    top: 0;
    right: 0;
    text-align: center;
    border: 0;
    border-left: 1px solid #ddd;
	border-radius: 0;
    background-color: transparent;
    transition: color .1s ease-in-out, background .1s ease-in-out;
}
.wc-backbone-modal-main .wc-backbone-modal-header .modal-close-link:focus, .wc-backbone-modal-main .wc-backbone-modal-header .modal-close-link:hover {
    background: #ddd;
    border-color: #ccc;
    color: #000;
}

.wc-order-preview .modal-close {
    border-radius: 0;
}

.wc-order-preview-table-wrapper, .wc-order-preview-addresses {
	padding: 1em;
}

.wc-order-preview-table-wrapper {
	max-height: 60vh; 
    overflow-y: auto; 
}

.wc-backbone-modal-main .wc-backbone-modal-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5em;
}

.wc-backbone-modal-main footer {
    position: relative;
    z-index: 100;
    padding: 1em 1.5em;
    background: #fcfcfc;
    border-top: 1px solid #dfdfdf;
    box-shadow: 0 -4px 4px -4px rgba(0, 0, 0, .1);
	height: 2.5em;
}
/*
.wc-order-preview-table-wrapper table tbody {
    max-height: 400px; 
    overflow-y: auto;  
    margin-top: 15px;
}
*/
.wc-order-preview-table {
    width: 100%; 
    border-collapse: collapse; 
}

.wc-order-preview-table th, .wc-order-preview-table td {
    padding: 8px;
    border: 1px solid #ddd;
}

/* Добавляем прокрутку только для содержимого */
.wc-backbone-modal-main {
    overflow-y: auto; 
    max-height: calc(90vh - 100px); 
}

/* Для таблицы товаров, добавляем прокрутку */
.wc-order-preview-table-wrapper {
    max-height: 60vh; 
    overflow-y: auto; 
    /*margin-top: 15px; */
}

.pre-order-preview i, 
.pre-order-edit i, 
.pre-order-delete i,
.copy-link i, 
.convert-to-order i {
	font-size: 15px;
	display: inline-block;
	cursor: pointer; 
	outline: none; 
}
.pre-order-edit i, 
.copy-link i, 
.convert-to-order i {
	margin-left: 15px;
	color: #2271b1;
}
.pre-order-delete i {
	color: #a8a8a8;
	margin-left: 15px;
}
.pre-order-preview, .pre-order-edit, .pre-order-delete {
	display: inline-block;
	text-decoration: none; 
}
 .pre-order-preview:focus, .pre-order-edit:focus, .pre-order-delete:focus {
	outline: none; 
	box-shadow: none; 
}		
			
.pre-order-edit, .pre-order-edit:hover {
	background-color: transparent;
	padding: 10px 0;
}
.convert-to-trailer {
	margin: 2px 0 0 15px!important;
	cursor: pointer;
}
.widefat td {
    vertical-align: middle;
}

#loading-indicator {
    display: none;  /* Изначально скрыт */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 9999;
	background: #eee;
    padding: 20px;
    border-radius: 50%;
}

.spinner {
    /*border: 4px solid #f3f3f3; 
    border-top: 4px solid #2271b1; 
    border-radius: 50%;*/
	visibility: visible;
    width: 40px;
    height: 30px;
	margin: 0;
	float: none;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-indicator p {
    color: #2271b1;
    font-size: 14px;
    margin-top: 10px;
}
.actions {
    display: flex;
    align-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
	margin: 10px auto;
}

.tooltip {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #276fb4;
    color: white;
    padding: 10px;
    border-radius: 10px;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.check-mark {
    font-size: 18px;
    color: white;
    font-weight: bold;
}

.bulk {
	width: 2%;
	text-align: center;
}
.apply-bulk-action {
	margin-left: 10px!important;
}

select[name="data-table_length"] {
    width: 50px !important;
}
