/* Popup "Su richiesta": stile minimo, colori e font arrivano dal tema. */

.gpr-dialog {
    width: min(32rem, calc(100vw - 2rem));
    max-height: calc(100svh - 2rem);
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 0;
    border-radius: 0.25rem;
    background: var(--gpr-bg, #fff);
    color: inherit;
    overflow-y: auto;
}

.gpr-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.gpr-chiudi {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    border: 0;
    background: none;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.gpr-titolo {
    margin: 0 2rem 0.5rem 0;
    font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
    line-height: 1.2;
}

.gpr-prodotto {
    margin: 0 0 1rem;
    font-weight: 600;
}

.gpr-campo {
    margin: 0 0 1rem;
}

.gpr-campo label {
    display: block;
    margin-bottom: 0.25rem;
}

.gpr-campo input[type="email"],
.gpr-campo input[type="tel"],
.gpr-campo select,
.gpr-campo textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6em 0.75em;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 0.125rem;
    background: transparent;
    color: inherit;
    font: inherit;
}

.gpr-privacy label {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.gpr-privacy input {
    margin-top: 0.2em;
    flex: none;
}

.gpr-altro {
    margin: 0 0 1rem;
}

.gpr-altro summary {
    cursor: pointer;
    margin-bottom: 0.75rem;
}

.gpr-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.gpr-errore {
    color: #b32d2e;
}

.gpr-invia {
    width: 100%;
}

.gpr-esito {
    margin: 1rem 0 0;
}

/* Il tema dà display ai .button: senza questo l'attributo hidden non nasconde. */
.gpr-apri[hidden] {
    display: none !important;
}

.gpr-azioni {
    margin: 1rem 0;
}

/* Taglia su richiesta scelta: niente rate né pulsante PayPal (svelerebbero il prezzo di un'altra taglia). */
body.gpr-variante-su-richiesta .ppcp-messages,
body.gpr-variante-su-richiesta .ppc-button-wrapper {
    display: none !important;
}

/* Riga sotto "Su richiesta": nascosta ovunque (regola in linea di swatch.js), visibile solo nel prezzo principale della scheda. */
.summary > .price .gpr-prezzo-nota,
.elementor-widget-woocommerce-product-price .price .gpr-prezzo-nota {
    display: block;
    margin-top: 0.5em;
    font-size: 0.6em;
    line-height: 1.4;
}

body.gpr-su-richiesta .ppcp-messages,
body.gpr-su-richiesta .ppc-button-wrapper {
    display: none !important;
}
