/* Formulari lead web producte Instop v02 - més compacte i botó inferior */
.instop-lead-modal,
.instop-lead-modal * {
    box-sizing: border-box;
}

.instop-lead-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    font-family: Arial, sans-serif;
}

.instop-lead-modal.obert {
    display: block;
}

.instop-lead-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(25, 25, 25, .62);
}

.instop-lead-box {
    position: relative;
    width: min(720px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    overflow: auto;
    margin: 14px auto;
    padding: 22px 24px 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .30);
    text-align: left;
}

.instop-lead-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333;
    cursor: pointer;
    font: 800 24px/1 Arial, sans-serif;
}

.instop-lead-close:hover {
    background: #e2e2e2;
}

.instop-lead-head {
    padding-right: 44px;
    margin-bottom: 14px;
}

.instop-lead-eyebrow {
    margin: 0 0 5px;
    color: #666;
    font: 700 14px/1 Arial, sans-serif;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.instop-lead-head h2 {
    margin: 0 0 5px;
    color: #333;
    font: 800 27px/1.08 Arial, sans-serif;
}

.instop-lead-head p {
    margin: 0;
    color: #666;
    font: 15px/1.35 Arial, sans-serif;
}

.instop-lead-producte {
    margin: 10px 0 14px;
    padding: 12px 14px;
    border-left: 5px solid var(--green, #6e8b3d);
    background: #f4faef;
    color: #405a27;
    border-radius: 9px;
    font: 800 17px/1.25 Arial, sans-serif;
}

.instop-lead-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.instop-lead-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #444;
    font: 800 13px/1.2 Arial, sans-serif;
}

.instop-lead-grid input,
.instop-lead-grid textarea {
    width: 100%;
    border: 1px solid #cfcfcf;
    border-radius: 9px;
    background: #fff;
    color: #222;
    padding: 11px 12px;
    font: 15px/1.35 Arial, sans-serif;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .03);
}

.instop-lead-grid textarea {
    min-height: 82px;
    resize: vertical;
}

.instop-lead-grid input:focus,
.instop-lead-grid textarea:focus {
    outline: 3px solid rgba(110, 139, 61, .20);
    border-color: var(--green, #6e8b3d);
}

.instop-lead-full {
    grid-column: 1 / -1;
}

.instop-lead-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.instop-lead-actions p {
    order: 1;
    margin: 0;
    color: #777;
    font: 13px/1.35 Arial, sans-serif;
}

.instop-lead-actions .instop-lead-submit {
    order: 2;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    border: 0 !important;
    border-radius: 10px;
    background: var(--green, #6e8b3d) !important;
    color: #fff !important;
    cursor: pointer;
    padding: 12px 20px;
    font: 800 20px/1.1 Arial, sans-serif;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(70, 100, 35, .22);
}

.instop-lead-actions .instop-lead-submit span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, .88);
    font: 700 12px/1 Arial, sans-serif;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.instop-lead-actions .instop-lead-submit:hover {
    background: #58762f !important;
}

.instop-lead-actions .instop-lead-submit:disabled {
    opacity: .65;
    cursor: wait;
}

.instop-lead-msg {
    margin-top: 10px;
    min-height: 21px;
    color: #666;
    font: 800 14px/1.35 Arial, sans-serif;
}

.instop-lead-msg.ok {
    color: #4d7e2b;
}

.instop-lead-msg.error {
    color: #c9302c;
}

.instop-lead-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.instop-web-lead-open {
    border: 0;
    min-width: 150px;
}

@media (max-width: 640px) {
    .instop-lead-box {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
        margin: 9px auto;
        padding: 18px;
        border-radius: 12px;
    }

    .instop-lead-head {
        padding-right: 38px;
    }

    .instop-lead-head h2 {
        font-size: 23px;
    }

    .instop-lead-producte {
        font-size: 15px;
    }

    .instop-lead-grid {
        grid-template-columns: 1fr;
    }

    .instop-lead-actions .instop-lead-submit {
        min-height: 56px;
        font-size: 19px;
    }
}


/* Ajust botó "Más información" de pàgina producte */
.instop-web-lead-open,
button.instop-web-lead-open,
.boto-comprar.instop-web-lead-open {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 150px !important;
    max-width: 220px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 13px 24px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--green, #6e8b3d) !important;
    color: #fff !important;
    font: 800 15px/1 Arial, sans-serif !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: 0 3px 9px rgba(70, 100, 35, .18) !important;
    cursor: pointer !important;
}

.instop-web-lead-open:hover,
button.instop-web-lead-open:hover,
.boto-comprar.instop-web-lead-open:hover {
    background: #58762f !important;
    transform: translateY(-1px);
}

.instop-web-lead-open:active,
button.instop-web-lead-open:active,
.boto-comprar.instop-web-lead-open:active {
    transform: translateY(0);
}

/* Si el botó queda dins d'un contenidor pensat per botons grans */
.intro .instop-web-lead-open,
.producte .instop-web-lead-open,
.contingut .instop-web-lead-open {
    margin-top: 8px !important;
    margin-bottom: 10px !important;
}


/* v04: consulta genèrica i camp producte per pàgines no dinàmiques */
.instop-lead-producte-field-ocult {
    display: none !important;
}

.instop-lead-producte-field input {
    border-color: #b9cfa2 !important;
    background: #fbfff7 !important;
}

.instop-web-lead-consulta-wrap {
    margin: 8px 0 12px;
}

.instop-web-lead-oferta,
button.instop-web-lead-oferta,
.boto-comprar.instop-web-lead-oferta {
    background: #b93222 !important;
    color: #fff !important;
    box-shadow: 0 3px 9px rgba(150, 45, 30, .20) !important;
}

.instop-web-lead-oferta:hover,
button.instop-web-lead-oferta:hover,
.boto-comprar.instop-web-lead-oferta:hover {
    background: #972618 !important;
}


/* v05: botó consulta amb la imatge antiga /0/cont.png */
.instop-web-lead-consulta-img {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer !important;
    line-height: 0 !important;
}

.instop-web-lead-consulta-img img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

.instop-web-lead-consulta-img:hover {
    background: transparent !important;
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.instop-web-lead-consulta-img:active {
    transform: translateY(0);
}


/* v07: consulta amb PNG original i fons totalment transparent */
.instop-web-lead-consulta-wrap-transparent,
.instop-web-lead-consulta-wrap-transparent *,
.instop-web-lead-consulta-wrap-transparent > *,
.instop-web-lead-consulta-wrap-transparent .instop-web-lead-consulta-img {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.instop-web-lead-consulta-png-transparent,
button.instop-web-lead-consulta-png-transparent {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    cursor: pointer !important;
    line-height: 0 !important;
}

.instop-web-lead-consulta-png-transparent img {
    display: block !important;
    width: auto !important;
    max-width: 140px !important;
    height: auto !important;
    border: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.instop-web-lead-consulta-png-transparent:hover,
button.instop-web-lead-consulta-png-transparent:hover {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.instop-web-lead-consulta-png-transparent:active,
button.instop-web-lead-consulta-png-transparent:active {
    transform: translateY(0);
}

/* Si el fons verd el posa el contenidor antic de la targeta */
div:has(> .instop-web-lead-consulta-wrap-transparent),
td:has(> .instop-web-lead-consulta-wrap-transparent),
div:has(.instop-web-lead-consulta-png-transparent),
td:has(.instop-web-lead-consulta-png-transparent) {
    background: transparent !important;
    background-color: transparent !important;
}

