/*
 * ACCELERE - Oney 3x4x DCC2 compliance styles (issue prestashop-clients/accelerefr#2).
 * Loaded automatically on every front page (PrestaShop 1.6 theme css/autoload/ directory).
 * Pairs with the theme overrides in modules/payplug/views/templates/hook/oney/.
 *
 * Size rules from the Oney book (Vdef):
 * - product / cart highlight (p. 6): warning + "TAEG FIXE 0%" LARGER than the "sans frais" wording.
 *   "sans frais" is drawn inside the 150px-wide SVG logo (about 9-10px tall on screen), so the warning
 *   is set at 14px bold, which keeps it clearly larger on desktop and mobile.
 * - pop-in schedule (p. 7): warning + TAEG fixe VISIBLY LARGER than apport / mensualites / cout
 *   (module sets them at 12px), so warning and TAEG are set at 16px bold.
 *   The pop-in title "PAYER sans frais PAR CARTE BANCAIRE" is 18px in the module; it is reduced to
 *   14px so that "sans frais" never outweighs the warning.
 */

/* Highlight: let the button wrap so the warning sits on its own line, inside the clickable area. */
.payplugOneyCta_button.payplugOneyCta_button--dcc2 {
    flex-wrap: wrap;
    text-align: left;
}

.payplugOneyCta_button .payplugOneyCta_dcc2Warning {
    flex: 0 0 100%;
    display: block;
    margin: 2px 0 0;
    /* The twinkle1.3 product price box is black (#000): the warning must be light to be visible
       (#2f2930 measured at ~1.5:1 contrast on the live site, 2026-11-25). White = same as the price. */
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: none;
    white-space: normal; /* module sets nowrap on every span of the button */
}

/* Keep the warning readable even while the CTA is greyed out (not yet eligible / loading):
   light grey on the black price box (about 12:1 contrast). */
.payplugOneyCta_button.-disabled .payplugOneyCta_dcc2Warning {
    color: #ccc;
}

/* Pop-in: tone down the "sans frais" title. */
.payplugOneyPopin .payplugOneyPopin_title {
    font-size: 14px;
    line-height: 17px;
}

/* Pop-in: TAEG fixe + warning, larger than the 12px schedule lines. */
.payplugOneyPopin .payplugOneyDcc2_taeg,
.payplugOneyPopin .payplugOneyDcc2_warning {
    margin: 8px 0 0;
    color: #2f2930;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

/* Pop-in: the full legal notice is long, keep it compact but readable. */
.payplugOneyPopin .payplugOneyPopin_legal {
    font-size: 11px;
    line-height: 1.4;
}

/*
 * Checkout (Oney book p. 8, "SANS FRAIS" column): logo block "oney sans frais" + "PAR CARTE BANCAIRE",
 * and the schedule wording rendered by payment/checkout_detail.tpl. Rows reuse the module's
 * .payplugOneyOption_prices ul li styles (one row per line, separator under each row).
 */
.payplugOneyOption_title .payplugOneyDcc2_byCard {
    display: block;
    margin: 0 0 4px;
    color: #7ebd00;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.2;
    text-transform: uppercase;
}

.payplugOneyOption_prices ul.payplugOneyDcc2_checkout li.payplugOneyDcc2_financed {
    border-bottom: 2px solid #dce0e8;
}

/* "sans frais" as text: hidden when the logo is visible (the logo already says it), shown whenever the
   module hides the checkout logos, i.e. below 1024px (@media (max-width:1023px) .payplugPayment
   .payplugOneyLogo {display:none}) and in its JS-driven mobile layout (.-mobile ... img {display:none}). */
.payplugOneyOption_title .payplugOneyDcc2_noFeesText {
    display: none;
}
.-mobile .payplugOneyOption_title .payplugOneyDcc2_noFeesText {
    display: inline;
}
@media (max-width: 1023px) {
    .payplugOneyOption_title .payplugOneyDcc2_noFeesText {
        display: inline;
    }
}

/* Desktop logo block (>= 1024px, the only width where the module shows the checkout logos): the module
   gives the title a fixed 90px height, which squeezes the logo once "PAR CARTE BANCAIRE" is added.
   Let it grow there only; below 1024px the fixed 90px height is what the module's mobile tab layout
   (.-mobile ... wrapper padding 89px) relies on, so it is left untouched. */
@media (min-width: 1024px) {
    .payplugOneyOption_title {
        height: auto;
        min-height: 90px;
        padding-bottom: 20px;
    }
    .payplugOneyOption_title img.payplugOneyLogo {
        flex-shrink: 0;
        height: 44px;
        max-height: 44px;
        width: auto;
    }
}

/* The checkout schedule list: no browser default indent (the theme does not reset ul padding). */
.payplugOneyOption_prices ul.payplugOneyDcc2_checkout {
    padding: 0;
}

/*
 * Payment step (05. Paiement): DCC2 warning under the collapsed Oney label (theme payment/payment.tpl).
 * The module collapses the block with max-height:90px on .payplugOneyPayment and a fixed 90px-high
 * trigger, so anything taller is clipped. Trigger and collapsed height are raised together to 110px
 * (150px below 768px, where the lines wrap more); they must stay equal, otherwise the hidden options
 * start to show under the trigger.
 */
.payplugOneyPayment_label .payplugOneyDcc2_checkoutWarning {
    display: block;
    margin-top: 4px;
    color: #2f2930;           /* the payment block background is light (#fbfbfb) */
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
}
.-disabled .payplugOneyPayment_label .payplugOneyDcc2_checkoutWarning {
    color: #777;
}
/* keep the label and the warning clear of the module's chevron (absolutely positioned at right:7px) */
.payplugOneyPayment .payplugOneyPayment_trigger {
    padding-right: 45px;
}
/* collapsed height = trigger height (110px from 768px up, where label + warning take 2-3 lines) */
.payplugOneyPayment:not(.-open):not(.-disabled) {
    max-height: 110px;
}
.payplugOneyPayment .payplugOneyPayment_trigger {
    height: 110px;
}
@media (max-width: 767px) {
    .payplugOneyPayment:not(.-open):not(.-disabled) {
        max-height: 150px;
    }
    .payplugOneyPayment .payplugOneyPayment_trigger {
        height: 150px;
    }
}
