/* Bearings (#1245 step 5): choice buttons on the product page. Loaded by the block itself.
   Colours of the approved design: action blue #0070e0, navy #232f3e, text #4d5b7c,
   border #d1d5db, chosen #eef6ff. Targets are at least 44 px high; everything wraps, so the
   block fits a 375 px screen without horizontal scrolling. */
.ct-brgp {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 0 16px;
    color: #4d5b7c;
    font-size: 14px;
    line-height: 21px;
    min-width: 0;
}
.ct-brgp *, .ct-brgp *::before, .ct-brgp *::after { box-sizing: border-box; }
.ct-brgp [hidden] { display: none !important; }

.ct-brgp-dims { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-brgp-dim {
    border: 1px solid #e3eef5;
    background: #f6f9fb;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    color: #232f3e;
}

.ct-brgp-ui { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ct-brgp-step { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ct-brgp-head, .ct-brgp-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 12px;
}
.ct-brgp .ct-brgp-h {
    margin: 0;
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
    color: #232f3e;
}
.ct-brgp-hint, .ct-brgp-help { font-size: 13px; }
.ct-brgp-help { flex: 1 1 260px; min-width: 0; }

.ct-brgp-opts { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.ct-brgp-opt {
    flex: 1 1 150px;
    min-width: 0;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #4d5b7c;
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow-wrap: anywhere;
}
.ct-brgp-step[data-step="clr"] .ct-brgp-opt { flex-basis: 130px; }
.ct-brgp-step[data-step="brand"] .ct-brgp-opt { flex-basis: 170px; }
.ct-brgp-opt:hover { border-color: #0070e0; }
.ct-brgp-opt:focus-visible, .ct-brgp-more:focus-visible, .ct-brgp-undo:focus-visible,
.ct-brgp-native-toggle:focus-visible {
    outline: 3px solid #0070e0;
    outline-offset: 2px;
}
.ct-brgp-opt.ct-brgp-on {
    border: 2px solid #0070e0;
    background: #eef6ff;
    padding: 7px 11px;
}
.ct-brgp-opt.ct-brgp-off {
    border: 1px dashed #5c636a;
    background: #f6f9fb;
    cursor: not-allowed;
}
.ct-brgp-opt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.ct-brgp-opt-label { font-weight: 700; font-size: 15px; color: #232f3e; }
.ct-brgp-check { font-weight: 700; color: #0070e0; }
.ct-brgp-tag, .ct-brgp-badge {
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    padding: 1px 6px;
    border-radius: 4px;
}
.ct-brgp-tag { background: #232f3e; color: #ffffff; }
.ct-brgp-badge { background: #ecfdf3; color: #146c43; }
.ct-brgp-opt-sub { font-size: 12px; line-height: 17px; color: #4d5b7c; }
.ct-brgp-opt-from { font-size: 12px; line-height: 17px; color: #232f3e; }
.ct-brgp-opt-price { font-size: 18px; line-height: 24px; font-weight: 600; color: #232f3e; }
.ct-brgp-opt-ship { font-size: 12px; line-height: 17px; font-weight: 500; color: #5c636a; }
.ct-brgp-opt-ship.ct-brgp-stock { color: #146c43; }
.ct-brgp-opt-ship.ct-brgp-alt { color: #0057ad; text-decoration: underline; }
/* a brand without this combination that offers a way out stays clickable */
.ct-brgp-opt.ct-brgp-off[aria-disabled="true"] .ct-brgp-opt-ship { color: #4d5b7c; }
.ct-brgp-empty { font-size: 13px; }

.ct-brgp-more, .ct-brgp-native-toggle {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0057ad;
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}
.ct-brgp-native-toggle { align-self: flex-start; }

.ct-brgp-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    border: 1px solid #b34700;
    border-radius: 6px;
    padding: 10px 12px;
    color: #232f3e;
}
.ct-brgp-notice-text { flex: 1 1 220px; min-width: 0; }
.ct-brgp-undo {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #ffffff;
    color: #232f3e;
    font: inherit;
    cursor: pointer;
}
.ct-brgp-choice { font-size: 13px; color: #232f3e; font-weight: 500; min-height: 21px; }

.ct-brgp-intro { margin: 0; font-size: 13px; line-height: 20px; color: #4d5b7c; }
.ct-brgp a.ct-brgp-opt, .ct-brgp a.ct-brgp-opt:hover { text-decoration: none; color: #4d5b7c; }
.ct-brgp-missing {
    border: 1px solid #b34700;
    border-radius: 6px;
    padding: 10px 12px;
    color: #232f3e;
    font-weight: 500;
}
.ct-brgp-nomatch .ct-brgp-choice { color: #b34700; }
/* the cart button of the page while this brand does not have the chosen combination */
.ct-brgp-blocked { opacity: .45; pointer-events: none; cursor: not-allowed; }

.ct-brgp-all { border-top: 1px solid #e3eef5; padding-top: 8px; }
.ct-brgp-all summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #232f3e;
    font-weight: 500;
    cursor: pointer;
}
.ct-brgp-all summary::before { content: "+"; color: #0057ad; font-weight: 700; }
.ct-brgp-all[open] summary::before { content: "−"; }
.ct-brgp-all summary::-webkit-details-marker { display: none; }
.ct-brgp-all summary:focus-visible, .ct-brgp-all a:focus-visible { outline: 3px solid #0070e0; outline-offset: 2px; }
/* the table scrolls inside its own box on a narrow screen, the page does not */
.ct-brgp-table { overflow-x: auto; border: 1px solid #e3eef5; border-radius: 8px; }
.ct-brgp-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ct-brgp-table th, .ct-brgp-table td { padding: 8px 10px; text-align: left; vertical-align: top; }
.ct-brgp-table thead th, .ct-brgp-specials th { background: #f6f9fb; color: #232f3e; font-size: 12px; }
.ct-brgp-table tbody tr { border-top: 1px solid #e3eef5; }
.ct-brgp-table td:first-child { color: #232f3e; font-weight: 700; }
.ct-brgp-table a { display: inline-block; min-height: 24px; color: #0057ad; }
.ct-brgp-code { font-family: monospace; font-size: 13px; white-space: nowrap; }
.ct-brgp-price { white-space: nowrap; font-variant-numeric: tabular-nums; color: #232f3e; }

/* Odoo's own variant control: hidden once the buttons work, one tap away as a list. */
.ct-brgp-native:not(.ct-brgp-native-open) { display: none !important; }
