.header-top {
    position: relative;
}

.pin-icon {
    width: 20px;
    height: 25px;
    margin-right: 5px;
    cursor: pointer;
    top: 0;
    left: 0;
    /* margin-bottom: 10px; */
}

.pin-icon-truck {
    width: 35px;
    height: 27px;
    margin-right: 5px;
    cursor: pointer;
    top: 0;
    left: 0;
}

.zone-container{
    display: flex;
    align-items: center;
    /* padding-left: 3.5%;
    padding-right: 4%; */
}

.modal-zone-container{
    display: flex;
    align-items: center;
    /* padding-left: 4px;
    padding-right: 4px; */
}

.zone-button {
    margin: 0;
    margin-right: 4px;
    cursor: pointer;
    /* line-height: 15px; */
}

.zone-button-modal {
    margin: 0;
    /* line-height: 15px; */
    white-space: nowrap;
}

.zone-button-empty{
    cursor: pointer;
    margin-bottom: 2px;
}

.zone-color-bold {
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zone-button-row {
    margin: 0;
    height: 15px;
}

.delivery-today-flag, .delivery-today-flag-zone-1{
    overflow: hidden;
    padding: 0px;
    background: transparent;
    border-radius: 4px;
    max-width: 100px;
    /* margin: 0px 4px; */
    margin-top: 0px;
    color: #fff;
    line-height: 24px;
}

.delivery-today-flag span,
.zone-color {
    color: #0fb8f0;
    font-weight: bold;
    cursor: pointer;
}


@media (min-width: 901px){
    .pin-icon-row {
        display: none;
    }

    .pin-icon-truck-row {
        display: none;
    }

    /* .zone-row {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
    } */
    .zone-row {
        display: flex;
        align-items: center;
        flex-direction: row;
    }
}

@media  (min-width: 275px) and (max-width: 900px) {
    .zone-1 {
        display: flex;
        align-items: center;
        min-width: 100px;
        flex-wrap: nowrap;
        flex: 0 0 auto;
        cursor: pointer;
    }

    .zone-2 {
        display: flex;
        align-items: center;
        min-width: 100px;
        flex-wrap: nowrap;
        flex: 0 0 auto;
        justify-content: flex-start;
        cursor: pointer;
    }

    .zone-button-row {
        display: none;
    }

    .pin-icon-row {
        width: 20px;
        height: 25px;
        margin-right: 5px;
        cursor: pointer;
        top: 0;
        left: 0;
    }

    .pin-icon-truck-row{
        width: 33px;
        height: 25px;
        margin-right: 5px;
        cursor: pointer;
        top: 0;
        left: 0;
    }

    .pin-icon-truck {
        display: none;
    }

    .zone-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .pin-icon {
        display: none;
    }

    /* .zone-container{
        margin-bottom: 10px;
    } */

    .zone-button {
        font-size: 12px;
        white-space: nowrap;
    }
    .delivery-today-flag { white-space: nowrap; }
}

@media (max-width:275px){
    .pin-icon-truck-row, .pin-icon-row{
        display: none;
    }
    .zone-button {
        font-size: 12px;
    }
}

.modal-header-pickzone {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    border-radius: 10px 10px 0px 0px;
}

.modal-header-pickzone button {
    position: absolute;
    right: 15px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    display: flex;
    justify-content: flex-start;
    flex-direction: row-reverse;
    background-color: transparent;
    border: 0px;
    font-size: 17px;
}

.modal-body-pickzone {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-body-pickzone .form-floating {
    display: flex;
    justify-content: flex-end;
    flex-direction: column-reverse;
    align-items: flex-start;
    margin-top: 10px !important;
}

.modal-body-pickzone .form-floating select {
    max-width: 320px;
    min-width: 320px;
}

@media (max-width:768px){
    .modal-body-pickzone .form-floating select {
        max-width: 269px;
        min-width: 273px;
    }
}

.modal-body-pickzone .form-floating label {
    margin-bottom: 0 !important;
}

.form-floating-comuna {
    display: none !important;
}

.spinner-border {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(15, 184, 240, 0.25);
    border-top-color: #0fb8f0;
    border-right-color: #0fb8f0;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    position: absolute;
    right: 1.25rem;
    top: 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* fbg */
.zone-1:hover{
    background-color: transparent;
}
#pickzoneModal .modal-content {
    min-height: auto ;
    border: 1px solid #e6e8eb;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    #pickzoneModal .modal-content {
        min-height: 348px;
        width: 90%;
        margin: auto;
    }
}


.modal-pickzone{
    top: 15%;
}
.modal-header-pickzone { background: #fff; }
.modal-pickzone select{ background-image: unset; }
.modal-footer .btn#saveZone{
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 16px;
}
.modal-footer .btn#saveZone:disabled{
    opacity: .6;
    cursor: not-allowed;
}
.zone-container.w-100.py-2 { z-index: -1; }


/* Bubble de invitación pickzone (anclado bajo el texto dentro de .zone-1) */
.zone-1 { position: relative; }
.pz-bubble {
    box-shadow: 0px 0px 15px -1px #0000003d !important;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 14px;
    max-width: 320px;
    min-width: 320px;
    z-index: 10;
}
.pz-bubble:before {
    content: "";
    position: absolute;
    top: -8px;
    left: 16px;
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}
.pz-bubble-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.pz-bubble-sub {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}
.pz-bubble-actions .btn-link {
    color: #007bff;
}

@media (max-width: 768px) {
    .pz-bubble{
        left: -89px;
    }

    .pz-bubble:before {
        left: 91px;
    }
}

/* Ajuste z-index para que el bubble se muestre por encima */
.zone-container.w-100.py-2 {
    z-index: 2;
}

/* Inputs modernos para selects del modal */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 8px !important;
    padding: 10px 34px 10px 12px;
    font-size: 14px;
    line-height: 20px;
    color: #222;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-select:focus {
    outline: none;
    border-color: #0fb8f0;
    box-shadow: 0 0 0 3px rgba(15,184,240,.15);
}
.pz-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220,53,69,.15) !important;
}
.pz-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 6px;
}
.select-wrap { position: relative; }
.select-wrap::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px; height: 8px;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}