/*
 * Styles.
 *
 * Layout and disclosure basics only; colors, fonts and spacing come from the theme. The highlight
 * color is the --iw-hc-highlight custom property set from the plugin settings.
 *
 * @package     iw-cpt-help-center
 * @since       1.0.0
 -------------------------------------------------------------- */

/* List */
.iw_cpt_help_center_list .iw_cpt_help_center_search {
    max-width: 790px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.iw_cpt_help_center_list .iw_hc_list_entry_by_category_wrapper {
    padding-bottom: 40px;
}

.iw_cpt_help_center_list .iw_hc_list_entry_by_category_wrapper.col-2 .iw_hc_list_entry_wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
}

@media (max-width: 767px) {
    .iw_cpt_help_center_list .iw_hc_list_entry_by_category_wrapper.col-2 .iw_hc_list_entry_wrapper {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Entry */
.iw_cpt_help_center_entry .iw_cpt_hc_header_wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    cursor: pointer;
    list-style: none;
}

.iw_cpt_help_center_entry .iw_cpt_hc_header_wrapper::-webkit-details-marker {
    display: none;
}

.iw_cpt_help_center_entry .iw_cpt_hc_entry_headline {
    margin: 0;
    font-size: inherit;
}

.iw_cpt_help_center_entry .iw_cpt_hc_entry_headline a {
    color: inherit;
    text-decoration: none;
}

.iw_cpt_help_center_entry .iw_cpt_hc_entry_headline a::after {
    /* The whole row is the link's click target. */
    content: "";
    position: absolute;
    inset: 0;
}

.iw_cpt_help_center_entry[data-entry-type="full_faq_entry"] .iw_cpt_hc_header_wrapper {
    position: relative;
}

.iw_cpt_help_center_entry .iw_cpt_hc_entry_action {
    display: inline-flex;
    flex: 0 0 auto;
}

.iw_cpt_help_center_entry .iw_cpt_hc_entry_action svg {
    transition: transform .2s ease;
}

.iw_cpt_help_center_entry[open] .iw_cpt_hc_entry_action svg {
    transform: rotate(180deg);
}

.iw_cpt_help_center_entry .iw_cpt_hc_entry_content {
    padding-bottom: 15px;
}

.iw_cpt_help_center_entry .iw_cpt_hc_entry_divider,
.iw_help_center_item .iw_hc_item_single_divider {
    border-bottom: 2px solid #DDDDDD;
}

/* A closed details shows only its summary, the divider inside it too: the line sits on the details. */
details.iw_cpt_help_center_entry {
    border-bottom: 2px solid #DDDDDD;
}

details.iw_cpt_help_center_entry .iw_cpt_hc_entry_divider {
    display: none;
}

.iw_cpt_help_center_entry summary:focus-visible,
.iw_cpt_help_center_entry a:focus-visible,
.iw_cpt_help_center_request summary:focus-visible,
.iw_help_center_item summary:focus-visible {
    outline: 2px solid var(--iw-hc-highlight, currentColor);
    outline-offset: 2px;
}

/* Request */
.iw_cpt_help_center_request_wrapper {
    padding-top: 40px;
}

.iw_cpt_help_center_request .iw_cpt_hc_request_headline {
    font-weight: bold;
}

.iw_cpt_help_center_request .iw_cpt_hc_request_button {
    display: inline-block;
    padding: 10px 15px;
    border: 2px solid var(--iw-hc-highlight, currentColor);
    border-radius: 5px;
    cursor: pointer;
    list-style: none;
}

.iw_cpt_help_center_request .iw_cpt_hc_request_button::-webkit-details-marker {
    display: none;
}

.iw_cpt_help_center_request .iw_cpt_hc_request_content {
    padding-top: 20px;
}

/* Single and category page */
.iw_hc_item_single_navigation a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 30px;
    color: inherit;
    text-decoration: none;
}

.iw_help_center_item .iw_hc_item_single_col_wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 4fr) minmax(0, 1fr);
    column-gap: 40px;
}

@media (max-width: 1023px) {
    .iw_help_center_item .iw_hc_item_single_col_wrapper {
        grid-template-columns: minmax(0, 1fr);
    }

    .iw_help_center_item .iw_hc_item_col-1-6.space-col {
        display: none;
    }
}

.iw_help_center_item .iw_hc_item_single_scp_header_wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    font-weight: bold;
}

.iw_help_center_item .iw_hc_item_single_scp_header_wrapper::-webkit-details-marker {
    display: none;
}

.iw_help_center_item .iw_hc_item_single_scp_details[open] .iw_hc_item_single_scp_action svg {
    transform: rotate(180deg);
}

.iw_help_center_item .iw_hc_item_single_scp_content {
    margin: 0;
    padding: 0;
    list-style: none;
}

.iw_help_center_item .iw_hc_item_single_scp_entry a {
    display: block;
    padding: 10px 15px;
    border-left: 2px solid transparent;
    color: inherit;
    text-decoration: none;
}

.iw_help_center_item .iw_hc_item_single_scp_entry.active a,
.iw_help_center_item .iw_hc_item_single_scp_entry a:hover {
    border-color: var(--iw-hc-highlight, currentColor);
    color: var(--iw-hc-highlight, currentColor);
}

@media (prefers-reduced-motion: reduce) {
    .iw_cpt_help_center_entry .iw_cpt_hc_entry_action svg {
        transition: none;
    }
}
