/**
*
*
*
* Find training - shared
*/
.crft-search-wrap,
.crft {
    --crft-navy: #0b1a6b;
    --crft-blue: #1f4fd8;
    --crft-orange: #ff5410;
    --crft-orange-dark: #e64400;
    --crft-green: #1a8a2e;
    --crft-red: #e0201b;
    --crft-border: #e3e8f4;
    --crft-soft: #eef3fd;
    --crft-radius: 10px;
    color: var(--crft-navy);
}

.crft *,
.crft-search-wrap * {
    box-sizing: border-box;
}

.crft button,
.crft-search-wrap button {
    font: inherit;
    cursor: pointer;
}

.crft a.crft-link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--crft-blue);
    font-size: 16px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.crft a.crft-link:hover,
.crft a.crft-link:focus {
    background: none;
    color: var(--crft-navy);
}

.crft select {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.crft-icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    font-size: inherit;
    line-height: 1;
}

.crft-icon--mask {
    background-color: currentColor;
    -webkit-mask: var(--crft-icon) center / contain no-repeat;
    mask: var(--crft-icon) center / contain no-repeat;
}

.crft-icon.dashicons {
    width: 1.15em;
    height: 1.15em;
    font-size: 1.15em;
}


/**
*
*
*
* [find_training_search]
*/
.crft-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--crft-border);
    border-radius: var(--crft-radius);
    box-shadow: 0 6px 24px rgba(11, 26, 107, 0.08);
    padding: 8px 8px 8px 22px;
    margin: 0;
}

.crft-search__icon {
    font-size: 22px;
    color: var(--crft-navy);
}

.crft .crft-search__input,
.crft-search .crft-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 10px 0;
    font-size: 16px;
    color: var(--crft-navy);
    outline: none;
}

.crft-search__input::placeholder {
    color: #4a5590;
}

.crft-search .crft-search__button {
    background: var(--crft-orange);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 14px 40px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    transition: background 0.2s;
}

.crft-search .crft-search__button:hover,
.crft-search .crft-search__button:focus {
    background: var(--crft-orange-dark);
    color: #fff;
}

.crft-search__popular {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 14px;
    font-size: 15px;
}

.crft-search__popular-label {
    margin-right: 10px;
}

.crft-search-wrap .crft-search__popular-link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--crft-blue);
    font-size: inherit;
}

.crft-search-wrap .crft-search__popular-link:hover,
.crft-search-wrap .crft-search__popular-link:focus {
    background: none;
    color: var(--crft-navy);
    text-decoration: underline;
}

.crft-search__popular-link + .crft-search__popular-link::before {
    content: "|";
    color: var(--crft-navy);
    margin: 0 10px;
}

@media (max-width: 600px) {
    .crft-search {
        padding-left: 14px;
    }
    .crft-search .crft-search__button {
        padding: 12px 18px;
    }
    .crft-search__icon {
        display: none;
    }
}


/**
*
*
*
* [find_training] - layout
*/
.crft {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-areas: "filters main";
    gap: 40px;
    align-items: start;
}

.crft-filters {
    grid-area: filters;
}

.crft-main {
    grid-area: main;
}

/* Mobile only */
.crft button.crft-filters-toggle {
    display: none !important;
}

@media (max-width: 1024px) {
    .crft {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "toggle" "filters" "main";
        gap: 20px;
    }

    .crft button.crft-filters-toggle {
        grid-area: toggle;
        display: inline-flex !important;
        align-items: center;
        gap: 8px;
        justify-self: start;
        background: #fff;
        color: var(--crft-navy);
        border: 1px solid var(--crft-border);
        border-radius: 8px;
        padding: 10px 18px;
        font-weight: 600;
    }

    .crft-filters {
        display: none;
    }

    .crft.filters-open .crft-filters {
        display: block;
    }
}


/**
*
*
*
* [find_training] - filters
*/
.crft-filters {
    background: #fff;
    border: 1px solid var(--crft-border);
    border-radius: var(--crft-radius);
    padding: 20px 26px 10px;
}

.crft-filters__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.crft .crft-filters__title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: var(--crft-navy);
}

.crft-filter {
    border-bottom: 1px solid var(--crft-border);
    padding: 12px 0 14px;
}

.crft-filter:last-child {
    border-bottom: 0;
}

.crft .crft-filter__toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: 0;
    padding: 4px 0;
    color: var(--crft-navy);
    font-size: 18px;
    font-weight: 700;
    text-align: left;
}

.crft .crft-filter__toggle:hover,
.crft .crft-filter__toggle:focus {
    background: none;
    color: var(--crft-navy);
}

.crft-filter__toggle i {
    font-size: 14px;
    transition: transform 0.2s;
}

.crft-filter.is-collapsed .crft-filter__toggle i {
    transform: rotate(180deg);
}

.crft-filter.is-collapsed .crft-filter__body {
    display: none;
}

.crft-filter__body {
    padding-top: 8px;
}

/* Checkboxes */
.crft-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 17px;
    cursor: pointer;
    position: relative;
}

.crft-check input,
.crft-cat__label input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.crft-check__box {
    flex: none;
    width: 22px;
    height: 22px;
    border: 2px solid #c7cee0;
    border-radius: 4px;
    background: #fff;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}

.crft-check input:checked + .crft-check__box {
    background: var(--crft-blue);
    border-color: var(--crft-blue);
}

.crft-check input:checked + .crft-check__box::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.crft-check input:focus-visible + .crft-check__box,
.crft-cat__label input:focus-visible ~ .crft-cat__name {
    outline: 2px solid var(--crft-blue);
    outline-offset: 2px;
}

.crft-check__icon {
    display: inline-flex;
    width: 22px;
    justify-content: center;
}

/* Categories */
.crft-cat__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crft-cat__label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px;
    margin-left: -8px;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    flex: 1;
    transition: background 0.15s;
}

.crft-cat__label:hover {
    background: var(--crft-soft);
}

.crft-cat__dot {
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--crft-colour, var(--crft-navy));
    position: relative;
}

.crft-cat__label input:checked ~ .crft-cat__dot {
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--crft-colour, var(--crft-navy));
}

.crft-cat__label input:checked ~ .crft-cat__name {
    font-weight: 700;
}

.crft-cat__count {
    font-weight: 400;
}

.crft .crft-cat__expand {
    background: none;
    border: 0;
    padding: 6px;
    color: var(--crft-navy);
}

.crft .crft-cat__expand:hover,
.crft .crft-cat__expand:focus {
    background: none;
    color: var(--crft-navy);
}

.crft-cat__expand i {
    transition: transform 0.2s;
}

.crft-cat__expand[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.crft-cat__children {
    padding: 2px 0 6px 30px;
}

.crft-cat__children .crft-check {
    font-size: 15px;
}

/* Selects */
.crft-select {
    position: relative;
    display: flex;
    align-items: center;
}

.crft-select::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border: solid var(--crft-navy);
    border-width: 0 2px 2px 0;
    transform: translateY(-75%) rotate(45deg);
    pointer-events: none;
}

.crft .crft-select select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1px solid var(--crft-border);
    border-radius: 8px;
    padding: 12px 42px 12px 16px;
    color: var(--crft-navy);
    font-size: 16px;
    line-height: 1.3;
    cursor: pointer;
    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji !important;
}

.crft-select--date > i {
    position: absolute;
    left: 16px;
    font-size: 18px;
    pointer-events: none;
}

.crft .crft-select--date select {
    padding-left: 48px;
}


/**
*
*
*
* [find_training] - toolbar & chips
*/
.crft-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.crft .crft-count {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    color: var(--crft-navy);
}

.crft-toolbar__controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.crft-sort {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
}

.crft-sort__label {
    white-space: nowrap;
}

.crft-sort .crft-select {
    min-width: 230px;
}

.crft-view {
    display: flex;
    border: 1px solid var(--crft-border);
    border-radius: 8px;
    overflow: hidden;
}

.crft .crft-view__button {
    background: #fff;
    color: var(--crft-navy);
    border: 0;
    border-radius: 0;
    width: 52px;
    height: 46px;
    font-size: 18px;
    padding: 0;
}

.crft .crft-view__button:hover,
.crft .crft-view__button:focus {
    background: var(--crft-soft);
    color: var(--crft-navy);
}

.crft .crft-view__button.is-active {
    background: var(--crft-navy);
    color: #fff;
}

.crft-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.crft .crft-chip {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: var(--crft-soft);
    color: var(--crft-navy);
    border: 0;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 16px;
    line-height: 1.2;
}

.crft .crft-chip:hover,
.crft .crft-chip:focus {
    background: #dfe7fa;
    color: var(--crft-navy);
}

.crft-chips .crft-link {
    font-size: 16px;
}

@media (max-width: 767px) {
    .crft .crft-count {
        font-size: 26px;
    }
    .crft-toolbar__controls {
        width: 100%;
        justify-content: space-between;
    }
    .crft-sort .crft-select {
        min-width: 0;
    }
}


/**
*
*
*
* [find_training] - results
*/
.crft-results {
    display: grid;
    gap: 20px;
    transition: opacity 0.2s;
}

.crft.is-loading .crft-results {
    opacity: 0.4;
    pointer-events: none;
}

.crft-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1.35fr) minmax(0, 1fr) 240px;
    background: #fff;
    border: 1px solid var(--crft-border);
    border-left: 8px solid var(--crft-colour, var(--crft-navy));
    border-radius: var(--crft-radius);
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(11, 26, 107, 0.05);
}

.crft-card__image {
    display: block;
    min-height: 220px;
    position: relative;
}

.crft .crft-card .crft-card__image img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    max-height: none;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.crft-card__main {
    padding: 22px 24px 22px 32px;
}

.crft .crft-card__title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.crft .crft-card__title a {
    color: var(--crft-navy);
    text-decoration: none;
}

.crft .crft-card__title a:hover {
    color: var(--crft-blue);
}

.crft-card__badge {
    display: inline-block;
    background: var(--crft-colour, var(--crft-navy));
    color: #fff;
    border-radius: 3px;
    padding: 5px 14px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

.crft .crft-card__excerpt {
    margin: 12px 0 14px;
    font-size: 17px;
    line-height: 1.5;
}

.crft .crft-card__details {
    color: var(--crft-blue);
    font-size: 17px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.crft-card__details i {
    font-size: 0.85em;
    margin-left: 4px;
}

.crft .crft-card__meta {
    list-style: none;
    margin: 22px 0;
    padding: 0 24px;
    border-left: 1px solid var(--crft-border);
    border-right: 1px solid var(--crft-border);
}

.crft .crft-meta {
    display: flex;
    gap: 12px;
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.4;
}

.crft .crft-meta:last-child {
    margin-bottom: 0;
}

.crft-meta__icon {
    flex: none;
    display: inline-flex;
    justify-content: center;
    width: 18px;
    padding-top: 1px;
    font-size: 15px;
}

.crft-meta--available {
    color: var(--crft-green);
}

.crft-meta--limited {
    color: var(--crft-red);
}

.crft-meta--full {
    color: #6b7394;
}

.crft-card__action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 22px 30px;
    text-align: center;
}

.crft-card__price {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--crft-navy);
}

.crft-card__price del {
    display: block;
    font-size: 18px;
    font-weight: 400;
    opacity: 0.6;
}

.crft-card__price ins {
    text-decoration: none;
}

.crft .crft-button {
    display: block;
    width: 100%;
    background: var(--crft-orange);
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 16px 20px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.crft .crft-button:hover,
.crft .crft-button:focus {
    background: var(--crft-orange-dark);
    color: #fff;
}

.crft .crft-button.loading {
    opacity: 0.7;
}

.crft .crft-button.added::after {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 10px;
}

.crft .crft-button--disabled,
.crft .crft-button--disabled:hover {
    background: #c7cee0;
    color: #fff;
    cursor: not-allowed;
}

/* "View cart" link WooCommerce adds after ajax add to cart */
.crft .crft-card__action .added_to_cart {
    margin-top: -8px;
    color: var(--crft-blue);
    text-decoration: underline;
    font-size: 15px;
}

.crft-empty {
    background: #fff;
    border: 1px solid var(--crft-border);
    border-radius: var(--crft-radius);
    padding: 40px;
    text-align: center;
    font-size: 17px;
}

.crft-empty p {
    margin: 0 0 12px;
}

/* Tablet list: price/action drops below */
@media (max-width: 1400px) {
    .crft:not(.is-grid) .crft-card {
        grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr);
    }
    .crft:not(.is-grid) .crft-card__image {
        grid-row: span 2;
    }
    .crft:not(.is-grid) .crft-card__meta {
        border-right: 0;
    }
    .crft:not(.is-grid) .crft-card__action {
        grid-column: 2 / -1;
        flex-direction: row;
        justify-content: space-between;
        border-top: 1px solid var(--crft-border);
        padding: 16px 24px 16px 32px;
    }
    .crft:not(.is-grid) .crft-card__action .crft-button {
        width: auto;
        min-width: 200px;
    }
}

/* Grid view, and list view on small screens */
.crft.is-grid .crft-results {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.crft.is-grid .crft-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto auto;
    border-left-width: 1px;
    border-top: 8px solid var(--crft-colour, var(--crft-navy));
}

.crft.is-grid .crft-card__image {
    min-height: 0;
    aspect-ratio: 16 / 10;
}

.crft.is-grid .crft-card__main {
    padding: 20px 22px 0;
}

.crft.is-grid .crft-card__meta {
    margin: 18px 22px 0;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid var(--crft-border);
}

.crft.is-grid .crft-card__action {
    padding: 20px 22px 22px;
}

@media (max-width: 767px) {
    .crft .crft-card {
        grid-template-columns: minmax(0, 1fr);
        border-left-width: 1px;
        border-top: 8px solid var(--crft-colour, var(--crft-navy));
    }
    .crft .crft-card__image {
        grid-row: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }
    .crft .crft-card__main {
        padding: 20px 20px 0;
    }
    .crft .crft-card__meta {
        margin: 18px 20px 0;
        padding: 16px 0 0;
        border: 0;
        border-top: 1px solid var(--crft-border);
    }
    .crft .crft-card__action {
        grid-column: auto;
        flex-direction: column;
        padding: 20px;
        border-top: 0;
    }
    .crft .crft-card__action .crft-button {
        width: 100%;
    }
}


/**
*
*
*
* [find_training] - footer & pagination
*/
.crft-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
}

.crft .crft-showing {
    margin: 0;
    font-size: 17px;
}

.crft-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.crft .crft-page {
    min-width: 52px;
    height: 52px;
    padding: 0 12px;
    background: #fff;
    color: var(--crft-navy);
    border: 1px solid var(--crft-border);
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
}

.crft .crft-page:hover,
.crft .crft-page:focus {
    background: var(--crft-soft);
    color: var(--crft-navy);
}

.crft .crft-page.is-current {
    background: var(--crft-navy);
    border-color: var(--crft-navy);
    color: #fff;
}

.crft-page-gap {
    align-self: center;
    padding: 0 4px;
}
