/* Importar OpenSans desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

/* Variables CSS */
:root {
    /*--primary-color: #115476;*/
    --primary-color: #3b6882;
    --primary-light: #1a6b8a;
    --primary-dark: #0d3f56;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --text-muted: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    /* Better distribution */
    align-items: center;
    /*margin-top: -1rem;*/
    /* Added margin to lower steps and prevent clipping */
    /*margin-bottom: 0.5rem;*/
    position: relative;
    flex-wrap: nowrap;
    /* Prevent wrapping */
    overflow-x: auto;
    /* Allow scrolling if screen is too small */
    padding-top: 10px;
    /* Added padding to prevent top clipping when overflow-x: auto */
    /*padding-bottom: 10px;*/
    /* Space for scrollbar if needed */
	cursor: pointer;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    /* Centered relative to circles half-height + top padding */
    left: 10%;
    right: 10%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    /* background-color: var(--white); */
    padding: 0 0.5rem;
    /* Reduced padding */
    flex: 1 0 auto;
    /* Allow items to keep their size */
    min-width: 60px;
    /* Minimum width to avoid crushing */
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: transform 0.28s cubic-bezier(.2, .9, .2, 1), box-shadow 0.28s ease, background-color 0.28s ease;
    will-change: transform, box-shadow;
}

.step.active .step-number {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.12);
    box-shadow: 0 10px 22px rgba(17, 84, 118, 0.18);
    animation: shadowPulse 2s ease-in-out infinite;
}

@keyframes shadowPulse {

    0%,
    100% {
        box-shadow: 0 10px 22px 0px rgba(17, 84, 118, 0.18);
    }

    50% {
        box-shadow: 0 10px 22px 8px rgba(17, 84, 118, 0.25);
    }
}

.step.completed .step-number {
    background-color: var(--border-color);
    color: var(--white);
}

.step-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
}

.step.active .step-title {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed .step-title {
    color: var(--text-muted);
}

/* Progress bar en navbar */
#navProgressBarCont .progress-steps {
    padding-top: 0;
    min-width: 200px;
}

#navProgressBarCont .progress-steps::before {
    top: 13px;
    left: 18%;
    right: 18%;
    background-color: rgba(255, 255, 255, 0.3);
}

#navProgressBarCont .step {
    min-width: 55px;
    padding: 0 0.2rem;
}

#navProgressBarCont .step-number {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3px;
    transition: none;
    will-change: auto;
}

#navProgressBarCont .step.active .step-number {
    background-color: #ffffff;
    color: #1a5276;
    transform: none;
    box-shadow: none;
    animation: none;
}

#navProgressBarCont .step.completed .step-number {
    background-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.8);
}

#navProgressBarCont .step-title {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
}

#navProgressBarCont .step.active .step-title {
    color: #ffffff;
    font-weight: 600;
}

#navProgressBarCont .step.completed .step-title {
    color: rgba(255, 255, 255, 0.6);
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.add-to-cart-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    border-radius: 0.25rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.add-to-cart-btn:hover {
    /*background-color: var(--primary-light);*/
	border-color: var(--primary-color);
}

.add-to-cart-btn:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
}

.container{
	margin-left: 82px;
	margin-right: 82px;
}

/*Table header*/
.table-header{
	background-color: var(--primary-color) !important;
	color: var(--white);
}

.action-column{
	display: flex;
	justify-content: center;
	align-items: center;
}

.header-first-step-cont{
	height: 100%;
}

.first-step-cont {
	height: 100%;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	padding-left: 5%;
	padding-right: 5%;
	justify-content: space-between;
	gap: 50px;
}

.grid-container {
	height: 75%;
	width: 100%;
    flex: 1;
    min-height: 0;
}

.GrdBus{
	flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 20px;
}

.GrdDet{
	min-width: 400px;
	max-width: 500px;
	width: 100%; 
	height: 100%;
    padding-bottom: 20px;
    padding-top: 10px;
}

.GrdStk{
  	height: 100%;
	width: 100%;
	padding: 10px;
}
.StkDispCont {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 70%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: none;
  z-index: 9999;
  flex-direction: column;
}

.overlayGrd {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  display: none;
  z-index: 1000;
}

.FooterGridStk {
    display: flex;
    flex-direction: row;
    height: 60px;
    padding: 5px 50px 5px 50px;
	justify-content: center;
}

.HeaderGridStk {
	height: 40px;
	background: var(--primary-color);
	color: var(--white); 
	padding-left: 10px;
	display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
	border-radius: 10px 10px 0px 0px;
	font-size: 16px !important;
    font: 16px helvetica, arial, verdana, sans-serif !important;
}

.grd-stk-btn{
    display: flex;
    width: fit-content;
    border-radius: 10px;
    font-size: 18px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    font-weight: 500;
    transition: background-color 0.2s;
    gap: 10px;
    padding-left: 20px;
    padding-right: 20px;
    align-items: center;
}

.InputBus{
    border: none !important;
    border-bottom: none !important;
    padding: 0.5rem 0.2rem;
    font-size: 1rem;
    background-color: transparent;
    width: 100%;
}

.text-primary {
    color: var(--primary-color) !important;
}

.header-art-bus{
    /*margin-left: 5%;
    margin-right: 5%;*/
    margin-top: 10px;
    margin-bottom: 10px;
    display: flex;
	gap: 20px;
}

.add-ped-from{
	width: 200px;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    font-weight: 500;
    transition: background-color 0.2s;
    font-size: 0.82rem;
    min-width: 130px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.InputBusCont {
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: white;
    display: flex;
    align-items: center;
	width: 100%;
}

.ped-search-cont {
    margin: 6px 10px 0px 10px;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: calc(100% - 20px);
}

.clear-search-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.clear-search-btn:hover {
    color: var(--primary-color);
}

.toggle-cart-btn {
    margin-left: auto;
    margin-right: 5px;
    flex-shrink: 0;
    background: none;
    color: var(--primary-color);
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    border: 2px solid var(--primary-color);
}

.toggle-cart-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.cols-chooser-panel {
    position: fixed;
    /* JV: por encima de .StkDispCont/.FacFromPed_ (z-index:9999), que envuelven
       GridStk/GrdPed en un modal; si no, el panel abre pero queda detrás */
    z-index: 10000;
    min-width: 200px;
    max-height: 260px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 6px 0;
}

.cols-chooser-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

.cols-chooser-item:hover {
    background-color: var(--bg-light, #f5f5f5);
}

.cols-chooser-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: calc(100% - 16px);
    margin: 6px 8px 2px;
    padding: 6px 10px;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
}

.cols-chooser-save-btn:hover {
    opacity: 0.9;
}

.custom-header-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    color: var(--white);
    overflow: hidden;
}

.custom-header-label-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    flex: 1;
}

.custom-header-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-header-sort-icon {
    font-size: 0.8rem;
    flex-shrink: 0;
}

.custom-header-menu-icon {
    flex-shrink: 0;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    margin-left: 5px;
}

.custom-header-menu-icon:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* ag-grid custom*/

.ag-theme-alpine .ag-cell:focus {
    outline: none !important;
}

/*.ag-theme-alpine .ag-cell-focus {
    border: none !important;
}*/

.ag-theme-alpine .ag-cell-range-selected {
    background-color: transparent !important;
}

.ag-paging-panel{
	height: 40px !important;
	height: 40px !important;
}

.ag-root-wrapper{
	border-radius: 10px !important;
}

.ag-sort-indicator-container{
	--ag-icon-font-color: var(--white);
}

.ag-paging-row-summary-panel{
	display: none;
}

/*Custom FieldSets*/
.x-fieldset-header {
    background-color: var(--primary-color);
    margin: 0px 0px 0px 0px;
    padding: 3px 10px 3px 10px;
    height: 28px;
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    width: 200px;
    border-radius: 5px 5px 0px 0px;
    justify-content: center;
}

.x-fieldset-header-text{
    color: white !important;
    font-size: 16px !important;
}

.x-fieldset-default{
	border: none;
}

.x-fieldset-body {
    border-top-color: var(--primary-color);
    border-top-style: solid;
	border-top-width: 2px;
	padding: 10px;
}

/*Custom panel header*/
.x-panel-header-default-horizontal.x-header-noborder{
	background-color: var(--primary-color);
	border-radius: 10px 10px 0px 0px;
	height: 40px;
}

.x-title-text{
    color: white !important;
    font-size: 16px !important;
    font: 16px helvetica, arial, verdana, sans-serif !important;
}

/*Detalle carrito*/
.cart-row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: #e9eff3;
    border-radius: 10px;
    padding: 0px 14px;
    font-family: Arial, sans-serif;
    gap: 2px;
}

.cart-title {
    font-weight: 700;
    color: #2d5c7f;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    height: 32px;
    display: flex;
    align-items: center;
}

.price-container {
    font-weight: 700;
    color: #1c2b36;
    font-size: 0.95rem;
}

.btn-cart-container{
	display: flex;
    gap: 10px;
}

.price-cant-cart {
    display: flex;
    align-items: center;
    gap: 30px;
    color: #4a5a66;
    font-size: 0.85rem;
    height: 32px;
}

.price-cant-cart .price-container {
    margin-left: auto;
}

.btn-cart {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
}

.btn-cart i {
    font-size: 16px;
}

.btn-cart:hover i {
    opacity: 0.7;
}

/*.btn-cart-edt{ color: var(--primary-color); }*/
.btn-cart-edt i {
    color: var(--primary-color);
}

/*.btn-cart-dlt{ color: var(--danger-color); }*/
.btn-cart-dlt i {
    color: var(--danger-color);
}

.cart-total {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-total-text{
    font-size: 18px;
    font-weight: bold;
}

.cart-total-button-cont{
    width: 100%;
    justify-content: center;
    display: flex;
}

.cart-total-button{
	width: 100%;
    border-radius: 10px;
    font-size: 18px;
	background-color: var(--primary-color);
	color: var(--white)
}

/*navigate buttons*/
.sticky-actions-footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    height: 100%;
    gap: 20px;
    align-items: center;
}

.nav-next-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 0.50rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.nav-next-btn:hover {
    background-color: var(--primary-light);
	color: var(--white);
}

.cob-med-footer{
	background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
	height: 100%;
	gap: 10px;
	border-radius: 0px 0px 10px 10px;
}

.cob-med-buttons {
    background-color: #2c5167 !important;
    border: none !important;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    height: 35px;
    width: 120px;
    justify-content: center;
    cursor: pointer !important;
}

.det-tes-cont{
	width: 100%;
	height: 100%;
}

.cob-med-header{
	background-color: var(--primary-color) !important;
    border-radius: 10px 10px 0px 0px;
    height: 38px;
    padding-left: 15px;
}

.med-cob-container{
	height: 100%;
	width: 100%;
}

.mc-price-cont{
	font-style: bold;
	font-size: 20px;
}

.mc-price-cont::before{
	content: "$";
}

.mc-tipo {
	font-style: bold;
	font-size: 20px;
	color: var(--primary-color);
}

.cont-ser-art{
	height: 100%;
	width: 100%;
	padding-top: 3%;
    padding-bottom: 3%;
    padding-left: 10%;
    padding-right: 10%;
}

/* total medios de cobro */
.tot-cart-box {
	background: #e9eff3;
	border-radius: 12px;
	padding: 1px 18px;
	font-family: Arial, sans-serif;
	margin-top: 5px;
	margin-left: -10px;
	margin-right: -10px;
    z-index: 1;
    flex: 1;
}

.tot-cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /*margin: 6px 0;*/
}

.tot-cart-label {
  color: #4a5a66;
  font-size: 15px;
}

.tot-cart-value {
  color: #1c2b36;
  font-weight: 600;
}

.tot-cart-divider {
  height: 1px;
  background: #bfc9d1;
  /*margin: 10px 0;*/
}

/* Primera fila (más marcada) */
.tot-strong {
  font-weight: 700;
}

/* Sección total (Restante) */
.tot-total-label {
  color: #2d5c7f;
  font-weight: 700;
  font-size: 16px;
}

.tot-total-value {
  font-size: 20px;
  font-weight: 800;
  color: #1c2b36;
}

.det-tes-row {
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: #e9eff3;
  border-radius: 10px;

  padding: 10px 14px;
  margin: 6px 0;

  font-family: Arial, sans-serif;
}

.det-tes-left {
  display: flex;
  align-items: center;
}

.det-tes-tipo {
  font-weight: 700;
  color: #2d5c7f;
  letter-spacing: 0.5px;
}

.det-tes-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.det-tes-price {
  font-weight: 700;
  color: #1c2b36;
}

.btn-delete {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.btn-delete i {
  font-size: 16px;
  color: #d9534f;
}

.btn-delete:hover i {
  opacity: 0.7;
}

.check-footer{
    transform: scale(1.5);
    accent-color: var(--primary-color);
}

.check-footer:checked{
    accent-color: var(--primary-color) !important;
}

.check-cont{
    display: flex;
    gap: 10px;
    align-items: center;
}

.check-label{
    font-size: 16px !important;
}

.det-med-cob-cont{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}

.add-med-cob-action{
    width: 8%;
    z-index: 0;
    margin-top: 5px;
    display: flex;
}

.add-med-cob-button{
    border-radius: 0px 10px 10px 0px;
    border: 0px;
    background-color: var(--primary-color);
    color: var(--white);
    padding-left: 15px;
}

.add-med-cob-button-2 {
    border-radius: 10px;
    border: 0px !important;
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    padding-left: 25px !important;
    padding-right: 25px !important;
    font-size: 1.25rem !important;
    height: 48px;
}

/* ===========================================================
   Modo oscuro (reutiliza las variables globales ya definidas
   en files\css\esp_tra\style_base.css: --black-primary-color,
   --black-secondary-color, --black-tertiary-color, --dark-text,
   --dark-text-muted). Mismo patrón que ese archivo: body.dark
   <selector> { ... } !important.
   =========================================================== */

body.dark .progress-steps::before {
    background-color: var(--black-tertiary-color) !important;
}

body.dark .step-number {
    background-color: var(--black-tertiary-color) !important;
    color: var(--dark-text-muted) !important;
}

body.dark .step.completed .step-number {
    background-color: var(--black-tertiary-color) !important;
    color: var(--dark-text) !important;
}

body.dark .step-title {
    color: var(--dark-text-muted) !important;
}

body.dark .step.completed .step-title {
    color: var(--dark-text-muted) !important;
}

body.dark .StkDispCont {
    background: var(--black-secondary-color) !important;
}

body.dark .InputBusCont,
body.dark .ped-search-cont {
    background-color: var(--black-secondary-color) !important;
}

body.dark .InputBusCont .bg-white,
body.dark .ped-search-cont .bg-white {
    background-color: transparent !important;
}

body.dark .clear-search-btn {
    color: var(--dark-text-muted) !important;
}

body.dark .cols-chooser-panel {
    background: var(--black-secondary-color) !important;
}

body.dark .cols-chooser-item:hover {
    background-color: var(--black-tertiary-color) !important;
}

body.dark .cols-chooser-save-btn {
    background-color: var(--black-tertiary-color) !important;
    color: var(--dark-text) !important;
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark .cart-row {
    background: var(--black-tertiary-color) !important;
}

body.dark .cart-title {
    color: var(--dark-text) !important;
}

body.dark .price-container {
    color: var(--dark-text) !important;
}

body.dark .price-cant-cart {
    color: var(--dark-text-muted) !important;
}

body.dark .tot-cart-box {
    background: var(--black-tertiary-color) !important;
}

body.dark .tot-cart-label {
    color: var(--dark-text-muted) !important;
}

body.dark .tot-cart-value {
    color: var(--dark-text) !important;
}

body.dark .tot-cart-divider {
    background: var(--black-secondary-color) !important;
}

body.dark .tot-total-label {
    color: var(--dark-text) !important;
}

body.dark .tot-total-value {
    color: var(--dark-text) !important;
}

body.dark .det-tes-row {
    background: var(--black-tertiary-color) !important;
}

body.dark .det-tes-tipo {
    color: var(--dark-text) !important;
}

body.dark .det-tes-price {
    color: var(--dark-text) !important;
}

body.dark .sticky-actions-footer .btn-outline-secondary {
    color: var(--dark-text-muted) !important;
    border-color: var(--dark-text-muted) !important;
}

body.dark .sticky-actions-footer .btn-outline-secondary:hover {
    background-color: var(--dark-text-muted) !important;
    color: var(--black-primary-color) !important;
}

body.dark .GrdDet .text-muted {
    color: var(--dark-text-muted) !important;
}

/* ag-grid: variantes del tema oscuro nativo (ag-theme-alpine-dark) para los
   ajustes custom que ya existen sobre ag-theme-alpine */
body.dark .ag-theme-alpine-dark .ag-cell:focus {
    outline: none !important;
}

body.dark .ag-theme-alpine-dark .ag-cell-range-selected {
    background-color: transparent !important;
}