/* Retail Community — modal compacto.
   Cargar DESPUÉS de retailcom.css / retailcom_responsive.css.
   Sólo afecta a #autoModal; no cambia su apertura automática. */

#autoModal .modal-dialog {
    width: calc(100% - 32px);
    max-width: 680px !important;
    margin: 16px auto;
}

#autoModal .custom-modal-content {
    position: relative;
    width: 100%;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    color: #fff;
    background-color: #123e30;
    background-image: linear-gradient(rgba(0, 0, 0, .42), rgba(0, 0, 0, .42)),
                      url('/static/img/retimg.jpg');
    background-size: cover;
    background-position: center;
    border: 0;
    border-radius: 12px;
}

#autoModal .modal-body {
    padding: clamp(26px, 4vw, 42px);
}

#autoModal .modal-body > .row {
    align-items: center;
    --bs-gutter-x: 20px;
    --bs-gutter-y: 16px;
}

#autoModal .modal-body .col-md-6:first-child img {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

#autoModal .text-container {
    padding: 0;
    text-align: left;
    min-width: 0;
}

#autoModal .custom-subtitle {
    margin: 0 0 10px;
    font-size: clamp(.95rem, 1.5vw, 1.1rem);
    line-height: 1.45;
}

#autoModal .custom-title {
    margin: 0 0 10px;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    line-height: 1.18;
    overflow-wrap: break-word;
}

#autoModal .custom-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    margin-top: 12px;
    padding: 10px 22px;
    background-color: #005137;
    color: #fff;
    font-size: .98rem;
    line-height: 1.3;
    white-space: normal;
    border-radius: 6px;
}

#autoModal .modal-close-custom {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 32px;
    height: 32px;
    padding: 6px;
    border-radius: 50%;
    background-color: rgba(255,255,255,.92);
    opacity: 1;
}

@media (max-width: 767.98px) {
    #autoModal .modal-dialog {
        width: calc(100% - 28px);
        max-width: 420px !important;
        margin: 14px auto;
    }

    #autoModal .modal-body {
        padding: 42px 24px 26px;
    }

    #autoModal .modal-body .col-md-6:first-child img {
        max-width: 145px;
        max-height: 110px;
    }

    #autoModal .text-container {
        text-align: center;
    }

    #autoModal .custom-subtitle {
        margin-bottom: 8px;
        font-size: .95rem;
    }

    #autoModal .custom-title {
        font-size: clamp(1.3rem, 5.5vw, 1.7rem);
        margin-bottom: 8px;
    }

    #autoModal .custom-button {
        margin-top: 12px;
        font-size: .95rem;
    }
}

@media (max-width: 380px) {
    #autoModal .modal-body {
        padding-inline: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #autoModal .custom-button {
        transition: none;
    }
}
