/* Workshop states (inc/workshop-states.php): labels on cards and on the workshop page. */

/* Ended workshops: muted, but still readable and clickable. */
.whizkidz-ended .thumbnail img {
    filter: grayscale(70%);
    opacity: 0.85;
}

/* Inline state label (archive cards, workshop page title). */
.whizkidz-state-label {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    color: #fff;
    background: var(--color-primary);
}

.whizkidz-state-label--incheiat {
    background: #6b7280;
}

.page-title .whizkidz-state-label {
    margin-top: 10px;
}

/* Section "Ateliere încheiate" on /ateliere/. */
.whizkidz-ended-heading {
    margin: 60px 0 10px;
}

.whizkidz-ended-heading p {
    margin: 0;
}

/* Ended workshop page: note instead of the registration button. */
.whizkidz-ended-note {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    background: #f3f4f6;
    font-size: 15px;
    line-height: 1.6;
}

.whizkidz-ended-note p {
    margin-bottom: 12px;
}

/*
 * Workshop cards (template-parts/workshop-card.php, #87; homepage and /ateliere/): status pill
 * over the photo, tag chips, a quiet meta line. On the homepage the photo crop
 * and its hover growth stay in style.css (.event-area-3); on /ateliere/ the
 * photo keeps its full size.
 */
.whizkidz-workshop-card {
    --wk-status-green-bg: rgba(76, 175, 80, 0.16);
    --wk-status-green-fg: #2a7030;
    --wk-status-yellow-bg: rgba(255, 193, 7, 0.22);
    --wk-status-yellow-fg: #7a5600;
    --wk-status-grey-bg: rgba(120, 144, 156, 0.18);
    --wk-status-grey-fg: #4d6470;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.whizkidz-status-pill {
    --pill-bg: var(--wk-status-green-bg);
    --pill-fg: var(--wk-status-green-fg);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: calc(100% - 24px);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--pill-fg);
    /* Over a photo the tint alone is unreadable: put it on a white base. */
    background: linear-gradient(var(--pill-bg), var(--pill-bg)), #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.whizkidz-status-pill--anuntat {
    --pill-bg: var(--wk-status-yellow-bg);
    --pill-fg: var(--wk-status-yellow-fg);
}

.whizkidz-status-pill--incheiat {
    --pill-bg: var(--wk-status-grey-bg);
    --pill-fg: var(--wk-status-grey-fg);
}

.whizkidz-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.whizkidz-workshop-card .thumbnail .whizkidz-status-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    pointer-events: none;
}

/* The theme pulls the text 75px over the photo on hover (app.css); keep the photo whole. */
.whizkidz-workshop-card:hover .thumbnail {
    margin-bottom: 0;
}

/* No photo: the pill sits on top of the text instead. */
.whizkidz-workshop-card .thumbnail.thumbnail--none {
    padding: 20px 24px 0;
    background-color: #f7f5f2;
    border-radius: 5px 5px 0 0;
}

.whizkidz-workshop-card .thumbnail.thumbnail--none .whizkidz-status-pill {
    position: static;
}

.whizkidz-workshop-card .content,
.whizkidz-workshop-card:hover .content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 24px 24px;
}

.whizkidz-workshop-card .content .title {
    margin-bottom: 8px;
    line-height: 1.3;
}

.whizkidz-workshop-card .content p.whizkidz-card-summary {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-body);
}

.whizkidz-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.whizkidz-tag-chip {
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.5;
    color: #5c5c5c;
    background: #ebe7e0;
}

/* Duration and places: white chips with the theme's icons. */
.whizkidz-tag-chip--fact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-heading);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.whizkidz-tag-chip--fact i {
    font-size: 14px;
    color: var(--color-secondary);
}

.whizkidz-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.whizkidz-card-price {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--color-heading);
}

/* The theme's mint link hover is too light for the title. */
.whizkidz-workshop-card .content .title a {
    color: var(--color-heading);
}

.whizkidz-workshop-card:hover .content .title a,
.whizkidz-workshop-card .content .title a:focus-visible {
    color: var(--color-secondary);
}

.whizkidz-card-more {
    display: inline-block;
    flex: none;
    margin-left: auto;
    font-size: 18px;
    line-height: 1;
    color: var(--color-heading);
    transition: var(--transition);
}

.whizkidz-workshop-card:hover .whizkidz-card-more {
    color: var(--color-secondary);
    transform: translateX(4px);
}

/* The title link covers the text part of the card; the photo keeps its own
   link (and the admin image tools on it). */
.whizkidz-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.whizkidz-card-link:focus-visible {
    outline: none;
}

.whizkidz-workshop-card:focus-within {
    outline: 2px solid var(--color-secondary);
    outline-offset: 4px;
}

.whizkidz-workshop-card:focus-within:not(:has(.whizkidz-card-link:focus-visible)) {
    outline: none;
}

/* Same hover background as .content (app.css), so a card without a photo stays one colour. */
.whizkidz-workshop-card .thumbnail.thumbnail--none {
    transition: var(--transition);
}

.whizkidz-workshop-card:hover .thumbnail.thumbnail--none {
    background-color: var(--color-white);
}

/* /ateliere/: every photo in the 370x250 format of whizkidz-workshop-thumb,
   so smaller or differently shaped uploads do not make the rows uneven. */
.workshop-item .whizkidz-workshop-card .thumbnail a img {
    display: block;
    aspect-ratio: 37 / 25;
    height: auto;
    object-fit: cover;
    object-position: center;
}

/* Small and touch screens: no hover growth (photo height, zoom, overlay); the
   homepage photo keeps its larger 200px crop. */
@media (max-width: 767.98px), (hover: none) {
    .event-area-3 .whizkidz-workshop-card .thumbnail a,
    .event-area-3 .whizkidz-workshop-card:hover .thumbnail a {
        height: 200px;
        transition: none;
    }

    .event-area-3 .whizkidz-workshop-card .thumbnail a img,
    .event-area-3 .whizkidz-workshop-card:hover .thumbnail a img {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .whizkidz-workshop-card:hover .thumbnail a img {
        transform: none;
    }

    .whizkidz-workshop-card:hover .thumbnail a:after,
    .whizkidz-workshop-card:hover .content:after {
        visibility: hidden;
        opacity: 0;
    }

    .whizkidz-workshop-card:hover .content {
        background-color: #f7f5f2;
    }

    .whizkidz-workshop-card:hover .thumbnail.thumbnail--none {
        background-color: #f7f5f2;
    }

    .whizkidz-workshop-card:hover .content .title a {
        color: var(--color-heading);
    }

    .whizkidz-workshop-card:hover .whizkidz-card-more {
        color: var(--color-heading);
        transform: none;
    }
}
