.puentec-bubble {
    position: fixed;
    z-index: 5;
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
    border: none;
    background: transparent;
    transition: transform 0.3s ease;
}


.puentec-bubble:hover {
    transform: scale(1.1);
}

.puentec-bubble img {
    display: block;
    max-width: 5em;
    height: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.puentec-bubble:hover img {
    opacity: 1;
}

.puentec-bubble-left {
    left: 20px;
}

.puentec-bubble-right {
    right: 20px;
}

.puentec-bubble-top {
    top: 20px;
}

.puentec-bubble-bottom {
    bottom: 20px;
}

.puentec-bubble-left.puentec-bubble-top {
    left: 20px;
    top: 20px;
    bottom: auto;
}

.puentec-bubble-left.puentec-bubble-bottom {
    left: 20px;
    bottom: 20px;
    top: auto;
}

.puentec-bubble-right.puentec-bubble-top {
    right: 20px;
    top: 20px;
    bottom: auto;
}

.puentec-bubble-right.puentec-bubble-bottom {
    right: 20px;
    bottom: 20px;
    top: auto;
}

@media screen and (max-width: 768px) {
    .puentec-bubble-left {
        left: 10px;
    }

    .puentec-bubble-right {
        right: 10px;
    }

    .puentec-bubble-top {
        top: 10px;
    }

    .puentec-bubble-bottom {
        bottom: 10px;
    }
}

#puentec-footer-popup {
    z-index: 100;
    padding: 20px;
    background-color: #333;
    color: white;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
}

#puentec-footer-popup header {
    display: flex;
    justify-content: space-between;
}

#puentec-footer-popup header h2 {
    font-size: 1.4rem;
    font-weight: bold;
    color: inherit;
}

#puentec-footer-popup header button {
    position: relative;
    top: -33px;
    border-radius: 100%;
    height: 30px;
    width: 30px;
    background-color: black;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
}

#puentec-footer-popup main {
    width: calc(100% - 260px);
}

#puentec-footer-popup footer {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    width: calc(100% - 250px);
    padding: 10px;
}

#puentec-footer-popup footer button {
    background-color: black;
    padding: 10px;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    min-width: 80px;
}

#puentec-footer-popup footer button.puentec-popup-button-secondary {
    background-color: transparent;
    border: 2px solid black;
}

#puentec-footer-popup img {
    position: absolute;
    bottom: 0;
    right: 0;
    margin-right: 10px;
    z-index: 11;
    width: 250px;
    max-height: 250px;
    object-fit: contain;
}

@media screen and (max-width: 768px) {
    #puentec-footer-popup {
        display: flex;
        flex-direction: column;
    }

    #puentec-footer-popup>div {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }

    #puentec-footer-popup main {
        width: 100%;
        flex: 1;
    }

    #puentec-footer-popup footer {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    #puentec-footer-popup img {
        position: static;
        width: 150px;
        max-height: 150px;
        object-fit: contain;
        flex-shrink: 0;
        margin-right: 0;
        z-index: auto;
    }
}

.puentec-advertisement-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    border: none;
    padding: 0;
    margin: 0;
}

body:has(.puentec-advertisement-popup[open]) {
    overflow: hidden;
}

#puentec-advertisement-popup-content {
    position: relative;
    background-color: transparent;
    border-radius: 12px;
    border: 5px solid white;
    max-width: 700px;
    width: 90%;
    max-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid gray;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#puentec-popup-text-image {
    height: auto;
    max-height: 380px;
    width: auto;
    max-width: 250px;
}


#puentec-popup-custom-image {
    max-width: 700px;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.puentec-advertisement-popup-promo-code h4 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 1rem;
}

.puentec-advertisement-popup-promo-code div {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.puentec-popup-header {
    display: flex;
    justify-content: center;
    align-items: start;
    margin-bottom: 20px;
    width: 100%;
    position: relative;
}

.puentec-popup-header .puentec-popup-close-desktop {
    position: absolute;
    right: 0;
    top: 0;
}

.puentec-popup-content-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.puentec-popup-content-row .puentec-popup-text {
    flex: 1;
}


.puentec-popup-close-desktop {
    background-color: rgba(0, 0, 0, 0.6);
    color: red;
    border: grey solid 1px;
    border-radius: 50%;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.puentec-popup-close-desktop:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

.puentec-popup-close-desktop svg {
    width: 28px;
    height: 28px;
}

.puentec-advertisement-popup-close-mobile {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.puentec-advertisement-popup-close-mobile button {
    margin-top: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: red;
    border: grey solid 1px;
    border-radius: 50%;
    cursor: pointer;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.puentec-advertisement-popup-close-mobile button svg {
    width: 28px;
    height: 28px;
}

.puentec-popup-close {
    position: absolute;
    background-color: #000;
    color: white;
    border: grey solid 1px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.puentec-popup-close:hover {
    background-color: #555;
}

.puentec-popup-image {
    text-align: center;
    padding: 20px 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.puentec-popup-image img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 4px;
    margin: 0 auto;
    filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.2));
}

.puentec-popup-body {
    padding: 20px;
}

.puentec-popup-title {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
}

.puentec-popup-text {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 1.2rem;
    color: white;
}

.puentec-popup-promo-code {
    background-color: #f8f9fa;
    border: 2px dashed #007cba;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.puentec-popup-promo-code strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.9rem;
}

.puentec-popup-promo-code .promo-code {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007cba;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.puentec-popup-actions {
    text-align: center;
}

.puentec-popup-button {
    display: inline-block;
    background-color: #007cba;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.puentec-popup-button:hover {
    background-color: #005a87;
    color: white;
    text-decoration: none;
}

@media screen and (max-width: 768px) {
    .puentec-popup-content {
        width: 95%;
        margin: 10px;
        max-height: 90vh;
    }

    .puentec-popup-body {
        padding: 10px;
    }

    .puentec-popup-title {
        font-size: 1.1rem;
    }

    .puentec-popup-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .puentec-popup-promo-code {
        padding: 10px;
        margin-bottom: 15px;
    }

    .puentec-popup-promo-code .promo-code {
        font-size: 1rem;
    }

    .puentec-popup-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .puentec-popup-image img {
        max-height: 150px;
    }

    .puentec-popup-close-desktop {
        display: none;
    }
}

.puentec-advertisement-image .puentec-popup-content {
    max-width: 800px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.puentec-advertisement-image #puentec-advertisement-popup-content {
    border: none;
    background-color: transparent !important;
}

.puentec-advertisement-image .puentec-popup-close-desktop {
    position: absolute;
    top: 10px;
    right: 10px;
}

.puentec-popup-image-container {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.puentec-popup-image-only {
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
    overflow-y: auto;
}

.puentec-popup-image-only img {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.4));
    margin: 0 auto;
}

.puentec-popup-promo-code-only {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}

.puentec-popup-promo-code-only strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.puentec-popup-promo-code-only .promo-code {
    font-size: 1.4rem;
    font-weight: bold;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

@media screen and (max-width: 768px) {
    #puentec-advertisement-popup-content {
        width: 90%;
        margin: auto;
        height: auto;
        max-height: 85vh;
        padding: 20px;
        overflow-y: auto;
        display: block;
        /* Cambiar a block para evitar problemas de flex con scroll */
    }

    .puentec-advertisement-popup-promo-code {
        top: 0;
        padding: 12px 20px;
        min-height: 60px;
        margin-bottom: 15px;
    }

    .puentec-advertisement-popup-promo-code h4 {
        font-size: 0.8rem;
    }

    .puentec-advertisement-popup-promo-code div {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .puentec-popup-content-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    #puentec-popup-text-image {
        max-width: 150px;
        order: 2;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .puentec-popup-text {
        order: 1;
        width: 100%;
        text-align: center;
    }

    .puentec-popup-close-desktop {
        display: none;
    }

    .puentec-advertisement-popup-close-mobile {
        display: flex;
        justify-content: center;
        padding: 15px 0;
        width: 100%;
    }

    .puentec-popup-actions {
        margin-top: 15px;
    }
}