/* ==========================================================================
   LibAnswers FAQ WordPress Plugin
   Styled to match libraries.uh.edu/contact/faq/
   ========================================================================== */

/* --------------------------------------------------------------------------
   Component-level reset
   Doubles the class specificity (.libanswers-faq .child) so these rules beat
   most WordPress theme selectors (.entry-content span, etc.).
   -------------------------------------------------------------------------- */

.libanswers-faq,
.libanswers-faq * {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   List container
   -------------------------------------------------------------------------- */

.libanswers-faq {
    color: #333;
}

.libanswers-faq .libanswers-faq__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Individual FAQ item  — matches .s-la-faq-listing spacing exactly
   -------------------------------------------------------------------------- */

.libanswers-faq .libanswers-faq__item {
    margin: 10px 0;
    padding: 0 0 10px;
    border-bottom: 1px solid #e8e8e8;
}

.libanswers-faq .libanswers-faq__item:last-child {
    border-bottom: 0;
}

/* --------------------------------------------------------------------------
   Question wrapper — zero out any theme margins on the div
   -------------------------------------------------------------------------- */

.libanswers-faq .libanswers-faq__q {
    margin: 0;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Question toggle button
   Styled as the red bold link from the reference page
   color: rgb(200, 16, 46), 24px bold, 32px line-height, underlined
   -------------------------------------------------------------------------- */

.libanswers-faq .libanswers-faq__toggle {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    /* Full browser/theme button reset */
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    text-align: left;
    /* Match reference question link */
    color: #c8102e;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    font-family: inherit;
    text-decoration: underline;
    text-transform: none;
    letter-spacing: normal;
}

.libanswers-faq .libanswers-faq__toggle:hover {
    color: #8f0b20;
}

.libanswers-faq .libanswers-faq__toggle:focus-visible {
    outline: 2px solid #c8102e;
    outline-offset: 3px;
    text-decoration: none;
}

.libanswers-faq .libanswers-faq__question-text {
    flex: 1 1 auto;
    /* Inherit the button's link styling */
    display: block;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-decoration: inherit;
}

/* Expand/collapse +/− indicator aligned to first line */
.libanswers-faq .libanswers-faq__indicator {
    flex-shrink: 0;
    display: block;
    width: 20px;
    height: 32px; /* matches question line-height so it sits on the first line */
    line-height: 32px;
    text-align: center;
    font-size: 22px;
    font-weight: 400;
    text-decoration: none;
    color: #c8102e;
}

.libanswers-faq .libanswers-faq__indicator::before {
    content: '+';
}

.libanswers-faq .libanswers-faq__toggle[aria-expanded="true"] .libanswers-faq__indicator::before {
    content: '−';
}

/* --------------------------------------------------------------------------
   Metadata row — flex so spans flow horizontally even if theme blocks them
   Matches: 12.6px, bold labels, #ccc pipe dividers
   -------------------------------------------------------------------------- */

.libanswers-faq .libanswers-faq__meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin: 2px 0 0;
    padding: 0;
    font-size: 12.6px;
    line-height: 24px;
    color: #333;
}

/* Every direct child of the meta row gets the same baseline treatment */
.libanswers-faq .libanswers-faq__meta > * {
    margin: 0;
    padding: 0;
    font-size: 12.6px;
    line-height: 24px;
}

.libanswers-faq .libanswers-faq__metalabel {
    font-weight: 700;
    margin-right: 4px;
    white-space: nowrap;
}

.libanswers-faq .libanswers-faq__metavalue {
    font-weight: 400;
    margin-right: 2px;
    white-space: nowrap;
}

.libanswers-faq .libanswers-faq__divider {
    color: #ccc;
    padding: 0 5px;
    white-space: nowrap;
}

/* Topic badge — matches .label.label-topic from reference */
.libanswers-faq .libanswers-faq__topic-badge {
    display: inline-block;
    background-color: #eee;
    color: #555;
    font-size: 9.45px;
    font-weight: 400;
    line-height: 9.45px;
    padding: 2.36px 4.73px;
    border-radius: 2.36px;
    margin-right: 3px;
    vertical-align: middle;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Answer panel
   -------------------------------------------------------------------------- */

.libanswers-faq .libanswers-faq__answer[hidden] {
    display: none;
}

.libanswers-faq .libanswers-faq__answer-body {
    margin: 8px 0 0;
    padding: 10px 0 6px;
    border-top: 1px solid #e8e8e8;
    color: #333;
    line-height: 1.7;
}

.libanswers-faq .libanswers-faq__answer-body > *:first-child {
    margin-top: 0;
}

.libanswers-faq .libanswers-faq__answer-body > *:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   "View full answer" permalink
   -------------------------------------------------------------------------- */

.libanswers-faq .libanswers-faq__permalink {
    margin-top: 10px;
    font-size: 12.6px;
}

.libanswers-faq .libanswers-faq__permalink a {
    color: #c8102e;
    text-decoration: underline;
}

.libanswers-faq .libanswers-faq__permalink a:hover {
    color: #8f0b20;
}
