/**
* 2007-2026 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2026 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/

/* ==========================================================================
   DYNAMIC POPUP - Estilos Frontend
   ========================================================================== */

/* Overlay del popup */

.dynamic-popup-overlay{
    position:fixed;
    inset:0;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    box-sizing:border-box;
    overflow:auto;
    z-index:99999;
    background:rgba(0,0,0,.7);
}


.dynamic-popup-overlay.dynamic-popup-visible {
    display: flex;
    opacity: 1;
}

.dynamic-popup-content {
    position: relative;
}

/* ==========================
   POPUP FORMULARIO
   ========================== */

.dynamic-popup-content-form{

    position:relative;
    width:min(560px,94vw);
    max-height:calc(100dvh - 40px);
    overflow-y:auto;
    background:#fff;
    border-radius:8px;
}
/* ==========================
   POPUP IMAGEN
   ========================== */

/* .dynamic-popup-content-image {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    max-width: none;
    max-height: none;

    padding:0;
    margin:0;
} */

.dynamic-popup-content-image {

    width:min(650px,80vw);

    background:transparent;
    box-shadow:none;
    border-radius:0;
    overflow:visible;

    padding:0;
    margin:0;
}

/* Botón cerrar */
.dynamic-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.dynamic-popup-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Prevenir scroll del body cuando el popup está abierto */
html.dynamic-popup-open {
    overflow: hidden;
}

/* ==========================================================================
   POPUP TIPO: IMAGEN
   ========================================================================== */

/* .dynamic-popup-image-wrapper{
    position:relative;
    display:inline-block;
    line-height:0;
} */

.dynamic-popup-image-wrapper{

    position:relative;

    width:100%;

    line-height:0;
}

/* .dynamic-popup-image{
    display:block;
    width:auto;
    max-width:100%;
    height:auto;
} */

.dynamic-popup-image{

    display:block;

    width:100%;

    height:auto;

    max-height:85vh;

    object-fit:contain;
}

.dynamic-popup-close-zone{

    position:absolute;
    top:3.5%;
    right:1.5%;
    width:30%;
    height:12%;
    cursor:pointer;
    z-index:20;
}

.dynamic-popup-action-zone{

    position:absolute;
    left:11%;
    bottom:10%;
    width:78%;
    height:12%;
    cursor:pointer;
    z-index:20;
}

/* ==========================================================================
   POPUP TIPO: FORMULARIO
   ========================================================================== */

.dynamic-popup-form-wrapper {
    padding: 30px;
}

.dynamic-popup-form-header {
    margin-bottom: 20px;
    text-align: center;
}

.dynamic-popup-form-header-image {
    max-width: 100%;
    height: auto;
}

.dynamic-popup-form .form-group {
    margin-bottom: 15px;
}

.dynamic-popup-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.dynamic-popup-form .required {
    color: #ff0000;
}

.dynamic-popup-form .form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.dynamic-popup-form .form-control:focus {
    outline: none;
    border-color: #FF5A00;
}

.dynamic-popup-form .btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dynamic-popup-form .btn-primary {
    background-color: #FF5A00;
    color: #ffffff;
}

.dynamic-popup-form .btn-primary:hover {
    background-color: #e54f00;
}

.dynamic-popup-form .btn-block {
    width: 100%;
}

.dynamic-popup-form-message {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.dynamic-popup-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dynamic-popup-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Checkbox GDPR personalizado */
.dynamic-popup-form .custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.dynamic-popup-form .custom-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.dynamic-popup-form .custom-checkbox label {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.dynamic-popup-form .custom-checkbox label a {
    color: #FF5A00;
    text-decoration: underline;
}

.dynamic-popup-form .custom-checkbox label a:hover {
    color: #e54f00;
}

/* Botón deshabilitado */
.dynamic-popup-form .btn:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.dynamic-popup-form .btn-primary:disabled {
    background-color: #ccc;
}

.dynamic-popup-form .btn-primary:disabled:hover {
    background-color: #ccc;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 767px) {
    .dynamic-popup-content-form{
        max-width:94vw;
        border-radius:12px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .dynamic-popup-form-wrapper{
        padding:20px;
    }

    .dynamic-popup-close{
        top:5px;
        right:5px;
        width:28px;
        height:28px;
        font-size:20px;
    }
}

/* Forzar visualización del checkbox del popup */
.dynamic-popup-form input.dynamic-popup-gdpr-consent {
    opacity: 1 !important;
    position: static !important;
    appearance: checkbox !important;
    -webkit-appearance: checkbox !important;

    width: 18px !important;
    height: 18px !important;

    margin: 3px 10px 0 0 !important;
    display: inline-block !important;
    visibility: visible !important;
    clip: auto !important;
    clip-path: none !important;
    z-index: 1;
}

.dynamic-popup-form select.form-control{

    background-image:none !important;

    appearance:auto !important;
    -webkit-appearance:auto !important;
    -moz-appearance:auto !important;

    padding-right:15px !important;
}

@media (max-height:800px){

    .dynamic-popup-overlay {
        position: fixed;
        inset: 0;

        align-items:flex-start;

        justify-content: center;

        padding: 20px;
        box-sizing: border-box;

        overflow-y: auto;
    }

    .dynamic-popup-content-form {
        width: min(560px, 94vw);
        max-height: calc(100dvh - 40px);
        overflow-y: auto;
    }
}
