:root {
    --blue: #007bff;
    --indigo: #6610f2;
    --purple: #6f42c1;
    --pink: #e83e8c;
    --red: #dc3545;
    --brown: #703B06;
    --orange: #fd7e14;
    --yellow: #ffc107;
    --green: #28a745;
    --teal: #20c997;
    --cyan: #17a2b8;
    --white: #fff;
    --soft-white: #b5b5bf;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --nav-color: #242933;
    --primary: #139ebb !important;
    --hov-primary: #5da099 !important;
    --primary-ligth: #96C11F !important;
    --hov-primary-ligth: #F7A516 !important;
    /* --soft-primary: rgba(247, 123, 11, 0.15); */
    --soft-primary: #1b859b;
    --secondary: #F9B233;
    --soft-secondary: rgba(143, 151, 171, 0.15);
    --success: #0abb75;
    --soft-success: rgba(10, 187, 117, 0.15);
    --info: #25bcf1;
    --soft-info: rgba(37, 188, 241, 0.15);
    --warning: #ffc519;
    --soft-warning: rgba(255, 197, 25, 0.15);
    --danger: #ef486a;
    --soft-danger: rgba(239, 72, 106, 0.15);
    --light: #f2f3f8;
    --soft-light: #dfdfe6;
    --dark: #313544;
    --soft-dark: rgba(42, 50, 66, 0.15);
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
}

.btn.show {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.bg-soft-red {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.bg-soft-purple {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
}

.bg-soft-blue {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.bg-soft-green {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.bg-soft-orange {
    background: rgba(135, 109, 25, 0.1);
    color: #ad6f18;
}

/*pagination*/
.aiz-pagination-center .pagination {
    -ms-flex-pack: center;
    justify-content: center;
}

.aiz-pagination-right .pagination {
    -ms-flex-pack: end;
    justify-content: flex-end;
}

.aiz-pagination .pagination {
    margin-bottom: 0;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.aiz-pagination .pagination .page-link,
.aiz-pagination .page-item.disabled .page-link {
    min-width: 36px;
    min-height: 36px;
    line-height: 36px;
    text-align: center;
    padding: 0;
    border: 0;
    font-size: 0.875rem;
    border-radius: 50% !important;
    color: var(--dark);
}

.aiz-pagination .pagination .page-item {
    margin: 0 10px 0 0;
}

.aiz-pagination .pagination .active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.aiz-pagination .pagination .page-link:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

thead th {
    background: var(--nav-color) !important;
    color: white !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    border-bottom: 2px solid #dee2e6 !important;
}

thead th a {
    color: white !important;
}

.cursor-auto {
    cursor: auto !important;
}

.ms-n1 {
    margin-left: -.25rem !important;
}

.text-year-campaign {
    margin-top: 11px !important;
    margin-left: 5px !important;
}

/* Small Tables */

.table.table-sm th,
.table.table-sm td {
    padding: 0.3rem 0.5rem !important;
}

.table.table-sm th:first-child,
.table.table-sm td:first-child {
    padding-left: 0.75rem !important;
}

.table-sm> :not(caption)>*>* {
    padding: 0.3rem 0.5rem !important;
}

/* Dropzone custom */
/* Estilo general del contenedor Dropzone */
.dropzone {
    border: 2px dashed var(--primary) !important;
    /* Borde azul */
    background-color: #f8f9fa;
    /* Fondo gris claro */
    border-radius: 10px;
    /* Bordes redondeados */
    padding: 20px;
    /* Espaciado interno */
    text-align: center;
}

/* Cambiar color cuando el usuario arrastra un archivo sobre el Dropzone */
.dropzone.dz-drag-hover {
    background-color: #e3f2fd !important;
    /* Azul claro */
    border-color: var(--primary) !important;
}

/* Personalizar mensaje dentro del Dropzone */
.dz-message {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* Personalizar los archivos que se han subido */
.dz-preview {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    background: #fff;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

/* Estilizar el botón de eliminar archivo */
.dz-remove {
    color: var(--danger) !important;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

/* Cambiar el color del texto de los archivos subidos */
.dz-filename {
    color: var(--primary);
}

/* Título del mensaje dentro del Dropzone */
.dropzone-msg-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    /* Azul */
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Descripción del mensaje dentro del Dropzone */
.dropzone-msg-desc {
    font-size: 14px;
    color: #555;
    /* Gris oscuro */
    font-style: italic;
    margin-top: 5px;
}

.dropzone .dz-preview .dz-remove {
    font-size: 14px;
    text-align: center;
    display: block;
    cursor: pointer;
    border: none;
}

.dropzone .dz-preview .dz-remove:hover {
    text-decoration: none !important;
}

.dropzone .dz-preview:hover .dz-details {
    opacity: 1;
}

.dropzone .dz-preview .dz-progress {
    top: auto !important;
    bottom: 20% !important;
}

/* Asegurar que los mensajes de error estén en línea con el archivo */
.dropzone .dz-preview .dz-error-message {
    position: absolute;
    right: -150px;
    /* Ajusta este valor según necesites */
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    /* Ajusta el ancho según el mensaje */
    background: var(--danger);
    color: white;
    padding: 5px;
    font-size: 12px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
}

/* Para evitar que se superponga en pantallas pequeñas */
@media (max-width: 768px) {
    .dropzone .dz-preview .dz-error-message {
        right: 0;
        left: 0;
        top: auto;
        bottom: -20px;
        /* Vuelve a la posición original en móviles */
        transform: none;
    }
}

.dropzone .dz-preview .dz-progress {
    opacity: 0.3 !important;
}

/* ribons */
.container-ribbon {
    --d: 6px;
    /* folded part */
    --c: blue;
    /* color */
    --f: 16px;
    /* ribbon font-size */

    width: auto;
    /* height: 180px; */
    position: relative;
    display: inline-block;
    margin: 20px;
}

.container-ribbon::before {
    content: attr(data-ribbon);
    position: absolute;
    font-size: var(--f);
    top: 0;
    right: 0;
    transform: translate(29.29%, -100%) rotate(45deg);
    color: #fff;
    text-align: center;
    border: 1px solid transparent;
    border-bottom: 0;
    transform-origin: bottom left;
    padding: 5px 35px calc(var(--d) + 5px);
    background: linear-gradient(rgba(0, 0, 0, 0.5) 0 0) bottom/100% var(--d) no-repeat var(--c);
    background-clip: padding-box;
    clip-path: polygon(0 0, 100% 0, 100% 100%, calc(100% - var(--d)) calc(100% - var(--d)), var(--d) calc(100% - var(--d)), 0 100%);
    -webkit-mask: linear-gradient(135deg, transparent calc(50% - var(--d) * 0.707), #fff 0) bottom left,
        linear-gradient(-135deg, transparent calc(50% - var(--d) * 0.707), #fff 0)bottom right;
    -webkit-mask-size: 300vmax 300vmax;
    -webkit-mask-composite: destination-in;
    mask-composite: intersect;
}

.left::before {
    left: 0;
    right: auto;
    transform: translate(-29.29%, -100%) rotate(-45deg);
    transform-origin: bottom right;
}

.description-table-responsive {
    max-height: 80px;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    white-space: normal;
}

th :is(a) {
    color: #000000 !important;
}

.sticky-col-end {
    position: sticky;
    right: 0;
    z-index: 1;
    /* base bajo */
    background-color: #fff;
    box-shadow: -1px 0 5px rgba(0, 0, 0, 0.1);
}

/* Cuando el dropdown se abre, elevamos toda la celda por encima del resto */
.sticky-col-end.sticky-open {
    z-index: 2000;
}

/* Por si hay headers sticky o contenedores con z-index altos */
.sticky-col-end .dropdown-menu {
    z-index: 2100;
}

table thead th {
    z-index: 11;
}

.table-responsive>table .dropdown {
    position: static;
}

.kv-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.description-table-responsive-md {
    max-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    white-space: normal;
}

.client-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px dashed #e5e5e5;
}

.client-details .detail-row:last-child {
    border-bottom: none;
}

.client-details .detail-label {
    color: var(--primary-color);
    font-weight: 500;
    margin-right: 8px;
    white-space: nowrap;
    font-size: 13px !important;
}

.client-details strong {
    color: #000;
}

td .text-wrap {
    word-break: break-word;
    white-space: normal;
}

.flex-min-0 {
    min-width: 0;
}

.break-anywhere {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.text-truncate-300 {
    font-size: 0.875rem;
    color: #6c757d;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-status-sm {
    font-size: 0.75rem;
}

.conversion-list {
    font-size: 0.85rem;
    color: #495057;
}

.conversion-item+.conversion-item {
    margin-top: 4px;
}

.bg-purple-subtle {
    background-color: #f3e8ff !important;
    color: #6f42c1 !important;
}

.text-purple {
    color: #6f42c1 !important;
}

/* OFFCANVAS */

.offcanvas-wide {
    width: 700px !important;
    /* Ancho fijo deseado */
    max-width: 90vw !important;
    /* Máximo 90% del ancho viewport, para móviles */
}

/* Para que el contenido no se salga y sea responsive */
@media (max-width: 767.98px) {
    .offcanvas-wide {
        width: 100% !important;
        /* En pantallas pequeñas full width */
    }
}

/* BARCODE */

.barcode-wrapper {
    max-width: 151px;
}

#barcodeSvg {
    width: 100% !important;
    height: auto !important;
}

.barcode-wrapper small {
    display: block;
    font-size: 0.7rem;
    color: #6c757d;
    text-align: center;
    margin-top: 0.25rem;
}

/* Match Height */

.match-height>[class*=col] {
    display: flex;
    flex-flow: column;
}

.match-height>[class*=col]>.card {
    flex: 1 1 auto;
}

/* Gallery */

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 10;
}

.swiper-slide:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay .btn {
    transition: transform 0.2s ease-in-out;
}

.gallery-overlay .btn:hover {
    transform: scale(1.1);
}

.btn-delete-media {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-media i {
    font-size: 16px;
}

/* Estilo base para flechas */
.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: absolute;
    top: 60%;
    /* centra verticalmente */
    transform: translateY(-50%);
    z-index: 10;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover */
.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

/* Iconos internos (el arrow como tal) */
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
    color: #fff;
}

/* Ajuste lateral para mejor visibilidad */
.swiper-button-prev {
    left: 5px;
}

.swiper-button-next {
    right: 5px;
}

/*color de nav del front*/
.bg-nav-front {
    background: var(--nav-color);
}

table tr td {
    font-size: 12px !important;
}

/*Ancho del popover*/
.custom-width-popover {
    max-width: 600px !important;
}

/**
KOD COLORS
*/
.menu-kod-color {
    color: #c02ed3;
}

.dish-kod-color {
    color: #d3832e;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item.active {
    color: var(--body-color);
}

.alert {
    padding: 0.4rem 0.4rem !important;
}

/* Sweet alert zindex */
.swal2-container {
    z-index: 10002 !important;
}

.swal2-popup .swal2-text-block {
    margin-bottom: 1rem;
}

.swal2-popup .swal-select2-wrap {
    width: calc(100% - 4rem);
    max-width: calc(100% - 4rem);
    margin: 0 auto;
    text-align: left;
}

.swal2-popup .swal-select2-wrap .select2-container {
    width: 100% !important;
    text-align: left;
}

.swal2-popup .swal-select2-wrap .select2-container .selection {
    display: block;
    width: 100%;
}

.swal2-popup .swal-select2-wrap .select2-selection--single {
    min-height: 46px;
    border: 1px solid #d8d6de !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 0.75rem !important;
    background: #fff !important;
    box-shadow: none !important;
}

.swal2-popup .swal-select2-wrap .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: 0 !important;
    padding-right: 1.75rem !important;
    color: #6c757d !important;
}

.swal2-popup .swal-select2-wrap .select2-selection__placeholder {
    color: #9aa1a9 !important;
}

.swal2-popup .swal-select2-wrap .select2-selection__arrow {
    height: 44px !important;
    right: 8px !important;
}

.swal2-popup .swal-select2-wrap .select2-container--open .select2-selection--single {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.12) !important;
}

.swal2-popup .select2-dropdown {
    border: 1px solid #d8d6de !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    padding: 0 !important;
}

.swal2-popup .select2-search--dropdown {
    padding: 0.5rem !important;
    background: #fff;
    margin: 0 !important;
}

.swal2-popup .select2-search--dropdown .select2-search__field {
    border: 1px solid #d8d6de !important;
    border-radius: 8px !important;
    padding: 0.45rem 0.65rem !important;
    margin: 0 !important;
}

.swal2-popup .select2-results {
    padding: 0 !important;
    margin: 0 !important;
}

.swal2-popup .select2-results>.select2-results__options {
    max-height: 220px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.swal2-popup .select2-results__option {
    padding: 0.75rem 0.9rem !important;
    margin: 0 !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
    color: #495057 !important;
    background: #fff !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}

.swal2-popup .select2-results__option--highlighted[aria-selected],
.swal2-popup .select2-results__option--highlighted[data-selected] {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-radius: 0 !important;
}

.swal2-popup .select2-results__option--selected {
    background-color: rgba(13, 110, 253, 0.08) !important;
    color: #495057 !important;
    border-radius: 0 !important;
}

.swal2-popup .select2-container--open .select2-dropdown--below {
    margin-top: 0 !important;
}

.swal2-popup .select2-container--open .select2-dropdown--above {
    margin-bottom: 0 !important;
}

.swal2-popup .swal2-actions {
    gap: 1rem;
}

.swal2-popup .swal2-actions .btn {
    min-width: 140px;
    justify-content: center;
}

/**Teclado Númerico**/

#virtualKeypad {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
}

#virtualKeypad .vk-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
}

#virtualKeypad .vk-panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .12);
}

.vk-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.vk-btn {
    flex: 1;
    padding: 12px 8px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    background: #f8f9fa;
    font-size: 1.05rem;
}

.vk-btn.vk-action {
    background: var(--primary-color);
    color: #fff;
    border-color: transparent;
}

.vk-btn:active {
    transform: scale(.995);
}

.select2-container--classic .select2-selection--multiple,
.select2-container--default .select2-selection--multiple {
    min-height: 33px !important;
    border: 1px solid #d8d6de;
}

.select2-container--default .select2-selection__choice {
    font-size: 0.8rem !important;
    margin-top: 5px !important;
}

a.dropdown-item.confirm-action.text-danger:hover {
    color: white !important;
}
