/* Stock Alert Popup - front office */

.sap-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: sapFade .18s ease-out;
}

@keyframes sapFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes sapPop {
    from { transform: translateY(12px) scale(.97); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

.sap-overlay .sap-modal {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .32);
    animation: sapPop .2s ease-out;
    font-size: 15px;
    line-height: 1.5;
}

.sap-overlay .sap-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
}

.sap-overlay .sap-icon {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid currentColor;
    font-weight: 700;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
}

.sap-overlay .sap-title {
    margin: 0;
    flex: 1 1 auto;
    font-size: 17px;
    font-weight: 700;
    color: inherit;
    text-transform: none;
}

.sap-overlay .sap-close {
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    opacity: .85;
    padding: 0 2px;
}

.sap-overlay .sap-close:hover {
    opacity: 1;
}

.sap-overlay .sap-body {
    padding: 18px 16px 4px;
    color: #333;
}

.sap-overlay .sap-product {
    margin: 0 0 8px;
    font-weight: 700;
    color: #111;
}

.sap-overlay .sap-message {
    margin: 0 0 10px;
    white-space: pre-line;
}

.sap-overlay .sap-qty {
    margin: 0 0 6px;
    font-size: 14px;
    color: #555;
}

.sap-overlay .sap-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px 18px;
}

.sap-overlay .sap-btn {
    cursor: pointer;
    min-width: 120px;
}

.sap-overlay .sap-btn.sap-cancel {
    background: #eceff1;
    border: 1px solid #cfd8dc;
    color: #37474f;
}

body.sap-no-scroll {
    overflow: hidden;
}

@media (max-width: 480px) {
    .sap-overlay .sap-footer {
        flex-direction: column-reverse;
    }
    .sap-overlay .sap-btn {
        width: 100%;
    }
}

/* Bouton réactivé par le module pour pouvoir afficher l'alerte de rupture */
.sap-forced-button {
    cursor: pointer !important;
    opacity: .75;
    pointer-events: auto !important;
}
