/* -----------------------------------------------------------------------
   GLS Paketomat – inline gumb unutar shipping opcije
   ----------------------------------------------------------------------- */

#gls-parcel-shop-wrap {
    margin: 10px 0 4px 0;
}

#gls-open-modal {
    display: inline-block;
    padding: 8px 18px;
    background: #003087;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#gls-open-modal:hover {
    background: #002266;
}

/* Odabrani paketomat – prikaz pored/ispod gumba */
#gls-selected-shop {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f8f0;
    border: 1px solid #2ea04d;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 13px;
}

#gls-selected-shop::before {
    content: "✓";
    color: #2ea04d;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

#gls-shop-name {
    font-weight: 600;
}

#gls-shop-address {
    color: #555;
}

#gls-shop-change {
    margin-left: auto;
    color: #777;
    font-size: 11px;
    white-space: nowrap;
    text-decoration: underline;
    cursor: pointer;
}

#gls-shop-change:hover {
    color: #333;
}

/* -----------------------------------------------------------------------
   Modal – centriran prozor na desktopu, gotovo fullscreen na mobitelu
   ----------------------------------------------------------------------- */

#gls-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

#gls-modal-overlay.gls-modal-open {
    display: flex;
}

/* X gumb – apsolutno pozicioniran u gornjem desnom kutu DPM containera */
#gls-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

#gls-modal-close:hover {
    background: #f0f0f0;
}

/* Karta – centriran prozor max 900×600 */
#gls-dpm-container {
    position: relative;
    width: min(900px, calc(100vw - 48px));
    height: min(600px, calc(100vh - 48px));
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

gls-dpm {
    display: block;
    width: 100%;
    height: 100%;
}

/* Sprečava scroll na body dok je modal otvoren */
body.gls-modal-active {
    overflow: hidden;
}

/* Mobitel – gotovo fullscreen */
@media (max-width: 600px) {
    #gls-modal-overlay {
        padding: 12px;
    }
    #gls-dpm-container {
        width: calc(100vw - 24px);
        height: calc(100vh - 24px);
    }
}
