/**
 * LNK FAQ Module - back office: what is only FAQ Pro's. The screens use the common skin of the
 * LNK modules (views/css/lib/lnk-admin.css, loaded before this sheet): no .lnkh-* rule here,
 * only lnkfaq-* classes (admin-skin check). Here: the rows of the common list (no thumbnail),
 * the guided placement control, the contrast warnings of the preview.
 *
 * @author    LNK
 * @copyright 2026 LNK
 * @license   https://opensource.org/licenses/MIT MIT License
 */

.lnkfaq-placements {
    max-width: 640px;
}

.lnkfaq-prow {
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f1;
}

.lnkfaq-prow:last-child {
    border-bottom: 0;
}

.lnkfaq-prow-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 600;
    cursor: pointer;
}

.lnkfaq-prow-head input {
    margin: 0;
}

.lnkfaq-prow-body {
    margin: 10px 0 2px;
    padding-inline-start: 26px;
}

.lnkfaq-prow-picker {
    position: relative;
    max-width: 420px;
}

.lnkfaq-targets-results {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    margin: 2px 0 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}

.lnkfaq-chips {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lnkfaq-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-block: 4px;
    padding-inline: 12px 6px;
    background: #f6f7f9;
    border: 1px solid #e2e6ec;
    border-radius: 16px;
}

.lnkfaq-chip-label {
    font-size: 13px;
}

.lnkfaq-chip-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    font-size: 15px;
    line-height: 1;
    color: #cc0000;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.lnkfaq-chip-x:hover {
    background: rgba(204, 0, 0, .1);
}

.lnkfaq-prow-hint {
    margin: 8px 0 0;
}

/* ------------------------------------------------------------------ */
/* Accent colour picker on the configuration screen                    */
/* ------------------------------------------------------------------ */

/*
 * PrestaShop renders the colour field as an <input type="color"> alone inside a
 * Bootstrap `.input-group`, and jquery.colorpicker.js appends its trigger as an
 * `.input-group-addon`. No PrestaShop version between 1.7.8 and 9.2 ships any CSS
 * for that trigger, so the input takes the whole group and the trigger collapses
 * to a clipped sliver.
 *
 * Bounding the group and giving the trigger a real width puts the two side by
 * side. Deliberately NOT `display: block` on the group: that drops the trigger
 * onto its own line.
 */
.defaultForm.lnk_faqpro .input-group {
    width: 320px;
}

.defaultForm.lnk_faqpro .input-group .mColorPickerTrigger {
    width: 42px;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
}

.defaultForm.lnk_faqpro .input-group .mColorPickerTrigger img {
    vertical-align: middle;
}


/* Common list without thumbnail: handle, question, then status and actions. */
.lnkh .lnkfaq-row { grid-template-columns: 16px minmax(0, 1fr) auto; }
.lnkh .lnkfaq-row .lnkfaq-row__side { grid-column: auto; }
.lnkh .lnkfaq-row__main { min-width: 0; }
.lnkh .lnkfaq-row__main p { overflow-wrap: anywhere; }
@container (max-width: 780px) {
    .lnkh .lnkfaq-row { grid-template-columns: 16px minmax(0, 1fr); }
    .lnkh .lnkfaq-row .lnkfaq-row__side { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 767px) {
    .lnkh .lnkfaq-row { grid-template-columns: minmax(0, 1fr); }
    .lnkh .lnkfaq-row .lnkfaq-row__side { grid-column: auto; }
}
.lnkh a.lnkfaq-group__name { font-weight: 600; color: var(--lnkh-ink); text-decoration: none; }
.lnkh a.lnkfaq-group__name:hover { text-decoration: underline; }

/* Import of LNK FAQ: a card above the page. */
.lnkh .lnkfaq-import { margin-bottom: 18px; }
.lnkh .lnkfaq-import ul { margin-top: 8px; }

/* Contrast warnings of the settings preview, under the frames. */
.lnkfaq-preview .lnkfaq-preview__warnings { margin: 12px 0 0; padding-inline-start: 18px; }

/* Classic back office: a HelperForm card without a title of its own (one card per section) keeps
   its padding at the top too (the common sheet leaves the top to the card heading). */
.lnkfaq-admin.lnkh .panel > .form-wrapper:first-child { padding-top: 18px; }
/* Multistore: shops of a category or a question (lists), scope of the settings. */
.lnkfaq-admin .lnkfaq-shops { margin-top: 4px; }
.lnkfaq-admin .lnkfaq-shops li { font-weight: 600; }
.lnkfaq-admin .lnkfaq-scope { margin: 0 0 12px; }

