/* ==========================================================================
   YITH Request a Quote — page liste uniquement
   Chargé seulement sur la page devis (voir functions.php), pas sur les fiches produit.
   ========================================================================== */

/* Ciblage : body.yith-request-a-quote-page (classe ajoutée par YITH sur cette page). */

body.yith-request-a-quote-page #content {
    padding-top: 50px;
    padding-bottom: 60px;
}

/* Sous 991px le header (#top-header) est fixed — éviter que #content passe sous la barre */
@media (max-width: 991px) {
    body.yith-request-a-quote-page #content {
        padding-top: calc(88px + env(safe-area-inset-top, 0px));
    }
}

/* Fil d’Ariane dans le wrapper WooCommerce (#main) — masqué sur la page YITH */
body.yith-request-a-quote-page #main #breadcrumbs {
    display: none !important;
}

/* -----------------------------------------------------------------------
   2. Wrapper principal YITH
   ----------------------------------------------------------------------- */
.woocommerce.ywraq-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Bouton(s) YITH : avant tableau + bloc avant formulaire (ex. « Retour aux produits », liste vide) */
.yith-ywraq-before-table .button,
.ywraq-before-form .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    background-color: #e1251b !important;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    text-decoration: none;
    margin-bottom: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.yith-ywraq-before-table .button:hover,
.yith-ywraq-before-table .button:active,
.ywraq-before-form .button:hover,
.ywraq-before-form .button:active {
    background-color: #FF4241 !important;
    color: #fff !important;
}

/* -----------------------------------------------------------------------
   3. Tableau produits — layout + typographie
   ----------------------------------------------------------------------- */
table.shop_table.cart.ywraq_responsive {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 16px;
}

table.shop_table.cart.ywraq_responsive thead tr {
    background: #f7f7f7;
}

table.shop_table.cart.ywraq_responsive thead th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #444;
    border-bottom: 2px solid #e5e5e5;
}

table.shop_table.cart.ywraq_responsive tbody td {
    padding: 18px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

table.shop_table.cart.ywraq_responsive tbody tr:last-child td {
    border-bottom: none;
}

/* -----------------------------------------------------------------------
   4. Colonne image — réduite à ~140 px
   ----------------------------------------------------------------------- */
table.shop_table.cart.ywraq_responsive .product-thumbnail {
    width: 150px;
    padding-right: 0;
}

table.shop_table.cart.ywraq_responsive .product-thumbnail a {
    display: block;
}

table.shop_table.cart.ywraq_responsive .product-thumbnail img {
    width: 140px !important;
    height: 140px !important;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    display: block;
}

/* -----------------------------------------------------------------------
   5. Colonne nom + attributs — skinée et lisible
   ----------------------------------------------------------------------- */
table.shop_table.cart.ywraq_responsive .product-name {
    vertical-align: middle;
    padding-left: 20px;
}

table.shop_table.cart.ywraq_responsive .product-name a {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    margin-bottom: 10px;
}

table.shop_table.cart.ywraq_responsive .product-name a:hover {
    color: #e1251b;
}

/* SKU (small) + attributs : même corps, à gauche, une ligne par attribut */
#yith-ywraq-form table.shop_table.cart.ywraq_responsive .product-name small {
    font-size: 12px;
    font-weight: 400;
    color: #555;
    line-height: 1.3;
}

#yith-ywraq-form table.shop_table.cart.ywraq_responsive .product-name ul,
#yith-ywraq-form table.shop_table.cart.ywraq_responsive .product-name ul li {
    font-size: 12px;
    font-weight: 400;
    color: #555;
    line-height: 1.2;
}

#yith-ywraq-form table.shop_table.cart.ywraq_responsive .product-name ul {
    list-style: none;
    margin: 4px 0 0 0 !important;
    padding: 0;
    display: block;
    text-align: left;
}

#yith-ywraq-form table.shop_table.cart.ywraq_responsive .product-name ul br {
    display: none;
}

#yith-ywraq-form table.shop_table.cart.ywraq_responsive .product-name ul li {
    display: block;
    text-align: left;
    margin: 0;
    padding: 0;
}

#yith-ywraq-form table.shop_table.cart.ywraq_responsive .product-name ul li strong {
    color: #444;
    font-weight: 600;
}

/* -----------------------------------------------------------------------
   6. Colonne quantité
   ----------------------------------------------------------------------- */
table.shop_table.cart.ywraq_responsive .product-quantity {
    width: 160px;
    text-align: center;
}

table.shop_table.cart.ywraq_responsive .product-quantity .quantity {
    display: inline-flex;
    align-items: stretch;
    vertical-align: middle;
    position: relative;
    float: none;
    margin: 0;
}

table.shop_table.cart.ywraq_responsive .product-quantity .quantity > .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

table.shop_table.cart.ywraq_responsive .product-quantity .larsenal-qty-btn {
    flex: 0 0 36px;
    width: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid #ccc;
    background: #f7f7f7;
    color: #222;
    font-family: "Roboto", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

table.shop_table.cart.ywraq_responsive .product-quantity .larsenal-qty-btn:hover:not(:disabled) {
    background: #eee;
    color: #e1251b;
}

table.shop_table.cart.ywraq_responsive .product-quantity .larsenal-qty-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

table.shop_table.cart.ywraq_responsive .product-quantity .larsenal-qty-minus {
    border-radius: 4px 0 0 4px;
    border-right: 0;
}

table.shop_table.cart.ywraq_responsive .product-quantity .larsenal-qty-plus {
    border-radius: 0 4px 4px 0;
    border-left: 0;
}

table.shop_table.cart.ywraq_responsive .product-quantity .qty {
    width: 52px;
    min-height: 36px;
    margin: 0;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 0;
    padding: 6px 4px;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    -moz-appearance: textfield;
    appearance: textfield;
}

table.shop_table.cart.ywraq_responsive .product-quantity .qty::-webkit-outer-spin-button,
table.shop_table.cart.ywraq_responsive .product-quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Bouton supprimer (×) */
table.shop_table.cart.ywraq_responsive .product-remove {
    width: 40px;
    text-align: center;
}

table.shop_table.cart.ywraq_responsive .product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #eee;
    border-radius: 50%;
    color: #999;
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

table.shop_table.cart.ywraq_responsive .product-remove a.remove:hover {
    background: #e1251b;
    color: #fff;
}

/* -----------------------------------------------------------------------
   7. Bouton "Mettre à jour la liste"
   ----------------------------------------------------------------------- */
.update-list-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 32px;
}

input[name="update_raq"].button {
    background-color: #e1251b !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

input[name="update_raq"].button:hover,
input[name="update_raq"].button:active {
    background-color: #FF4241 !important;
    color: #fff !important;
}

/* -----------------------------------------------------------------------
   8. Section formulaire "Envoyer la demande"
   ----------------------------------------------------------------------- */
.yith-ywraq-mail-form-wrapper {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 32px 36px;
    max-width: 680px;
}

.yith-ywraq-mail-form-wrapper h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0 0 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e1251b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Champs de formulaire */
.yith-ywraq-mail-form-wrapper .form-row {
    margin-bottom: 16px;
}

.yith-ywraq-mail-form-wrapper .form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.yith-ywraq-mail-form-wrapper .form-row .input-text,
.yith-ywraq-mail-form-wrapper .form-row textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
    color: #222;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.yith-ywraq-mail-form-wrapper .form-row .input-text:focus,
.yith-ywraq-mail-form-wrapper .form-row textarea:focus {
    border-color: #0066b4;
    box-shadow: 0 0 0 3px rgba(0, 102, 180, 0.12);
    outline: none;
}

/* Select2 (Province) — même gabarit que .input-text */
.yith-ywraq-mail-form-wrapper .woocommerce-input-wrapper .select2-container {
    width: 100% !important;
    max-width: 100%;
}

.yith-ywraq-mail-form-wrapper .select2-container--default .select2-selection--single {
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    min-height: 42px;
    height: auto;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.yith-ywraq-mail-form-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 10px 36px 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #222;
}

.yith-ywraq-mail-form-wrapper .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #757575;
}

.yith-ywraq-mail-form-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    right: 8px;
    top: 1px;
}

.yith-ywraq-mail-form-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #555 transparent transparent transparent;
    border-width: 5px 5px 0 5px;
    margin-left: -5px;
    margin-top: -3px;
}

.yith-ywraq-mail-form-wrapper .select2-container--default.select2-container--focus .select2-selection--single,
.yith-ywraq-mail-form-wrapper .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #0066b4;
    box-shadow: 0 0 0 3px rgba(0, 102, 180, 0.12);
}

.yith-ywraq-mail-form-wrapper .ywraq-province-notice {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    line-height: 1.45;
}

/* Bouton envoyer */
.yith-ywraq-mail-form-wrapper input.raq-send-request {
    background-color: #e1251b !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.yith-ywraq-mail-form-wrapper input.raq-send-request:hover,
.yith-ywraq-mail-form-wrapper input.raq-send-request:active {
    background-color: #FF4241 !important;
    color: #fff !important;
}


/* -----------------------------------------------------------------------
   9. Responsive — mobile
   ----------------------------------------------------------------------- */
@media (max-width: 768px) {
    .yith-ywraq-mail-form-wrapper {
        padding: 24px 20px;
    }

    table.shop_table.cart.ywraq_responsive .product-thumbnail {
        width: 90px;
    }

    table.shop_table.cart.ywraq_responsive .product-thumbnail img {
        width: 80px !important;
        height: 80px !important;
    }

    table.shop_table.cart.ywraq_responsive .product-name a {
        font-size: 14px;
    }

    table.shop_table.cart.ywraq_responsive .product-name {
        text-align: left;
    }

    table.shop_table.cart.ywraq_responsive .product-quantity {
        width: auto;
    }

    #yith-ywraq-form table.shop_table.cart.ywraq_responsive .product-name ul {
        margin-top: 4px !important;
        width: 100%;
    }

    #yith-ywraq-form table.shop_table.cart.ywraq_responsive .product-name ul li {
        line-height: 1.2;
        padding: 0;
        white-space: nowrap;
    }
}

/* Détail d'une soumission (mon compte) : les <header> du gabarit YITH
   héritaient du menu (fond noir + ombre). On les remet à plat ici seulement. */
.ywraq-view-quote-wrapper header {
    background: none;
    background-color: transparent;
    box-shadow: none;
}

.ywraq-view-quote-wrapper table.shop_table.order_details .product-thumbnail img {
    max-width: inherit !important;
}

.ywraq-view-quote-wrapper table.shop_table.order_details {
    width: 100%;
}