/**
 * Composant Bon cadeau
 *
 * Choix du montant (liste déroulante des produits à variations) et champs du bon cadeau,
 * stylés comme les formulaires du thème.
 */

/* Choix de la variation : libellé au-dessus de la liste, sur toute la largeur */
body.woocommerce-page .page-interieure div.product form.variations_form{
    align-items: stretch;
}
body.woocommerce-page .page-interieure div.product form.variations_form table.variations{
    width: 100%;
    margin: 0;
    border: 0;
}
body.woocommerce-page .page-interieure div.product form.variations_form table.variations tbody,
body.woocommerce-page .page-interieure div.product form.variations_form table.variations tr{
    border: 0;
    background: none;
}
body.woocommerce-page .page-interieure div.product form.variations_form table.variations tr{
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
body.woocommerce-page .page-interieure div.product form.variations_form table.variations th,
body.woocommerce-page .page-interieure div.product form.variations_form table.variations td{
    display: block;
    padding: 0;
    border: 0;
    background: none;
    line-height: 1.3;
    text-align: left;
}

/* Libellés */
body.woocommerce-page .page-interieure div.product form.variations_form table.variations th label,
body.woocommerce-page .page-interieure div.product form.variations_form .wpgv-label{
    display: block;
    margin: 0 0 0.8rem;
    font-weight: 600;
    font-size: clamp(1.4rem, 1.4vw, 1.6rem);
    color: rgb(var(--marron-texte));
}

/* Liste déroulante : flèche du thème à la place de celle du navigateur */
body.woocommerce-page .page-interieure div.product form.variations_form table.variations select{
    appearance: none;
    width: 100%;
    max-width: 40rem;
    min-width: 0;
    margin: 0;
    font-family: inherit;
    font-size: var(--1-8rem);
    color: rgb(var(--marron-fonce));
    background-color: rgb(var(--blanc));
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23523e35' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1.2rem auto;
    border: 1px solid rgb(var(--marron-texte));
    border-radius: 0;
    padding: 1rem 4rem 1rem 1.2rem;
    height: 4.8rem;
    min-height: 0;
    line-height: 1.3;
    box-sizing: border-box;
    cursor: pointer;
    transition: 0.3s border-color ease, 0.3s box-shadow ease;
}
body.woocommerce-page .page-interieure div.product form.variations_form table.variations select:hover{
    border-color: rgb(var(--marron-fonce));
}
body.woocommerce-page .page-interieure div.product form.variations_form table.variations select:focus-visible,
body.woocommerce-page .page-interieure div.product form.variations_form .wpgv-field-container input:focus-visible,
body.woocommerce-page .page-interieure div.product form.variations_form .wpgv-field-container textarea:focus-visible{
    outline: 2px solid rgb(var(--marron-fonce));
    outline-offset: 2px;
}

/* Lien « Effacer » sous la liste */
body.woocommerce-page .page-interieure div.product form.variations_form .reset_variations{
    display: block;
    width: fit-content;
    margin: 0.8rem 0 0;
    font-size: clamp(1.3rem, 1.3vw, 1.5rem);
    color: rgb(var(--marron-texte));
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

/* Champs du bon cadeau (noms, e-mails, message) */
body.woocommerce-page .page-interieure div.product form.variations_form #wpgv-purchase-container{
    width: 100%;
    max-width: 40rem;
}
body.woocommerce-page .page-interieure div.product form.variations_form .wpgv-field-container{
    margin: 0 0 1.6rem;
}
body.woocommerce-page .page-interieure div.product form.variations_form .wpgv-field-container input,
body.woocommerce-page .page-interieure div.product form.variations_form .wpgv-field-container textarea,
body.woocommerce-page .page-interieure div.product form.variations_form #wpgv_message{
    display: block;
    width: 100%;
    margin: 0;
    font-family: inherit;
    font-size: var(--1-8rem);
    color: rgb(var(--marron-fonce));
    background-color: rgb(var(--blanc));
    border: 1px solid rgb(var(--marron-texte));
    border-radius: 0;
    padding: 1rem 1.2rem;
    min-height: 4.8rem;
    line-height: 1.3;
    box-sizing: border-box;
}
body.woocommerce-page .page-interieure div.product form.variations_form #wpgv_message{
    height: 12rem;
    resize: vertical;
}
body.woocommerce-page .page-interieure div.product form.variations_form .wpgv-subtitle{
    font-size: clamp(1.2rem, 1.2vw, 1.4rem);
    color: rgb(var(--marron-texte));
}
