/* UN Looks — Frontend styles */

/* ── Look detail ────────────────────────────────────────────────────────── */

.un-look-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.un-look-detail__header {
    margin-bottom: 24px;
}

.un-look-detail__title {
    font-size: 2em;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.2;
}

.un-look-featured-badge {
    color: var(--un-rose);
    font-size: 0.7em;
    vertical-align: middle;
    margin-left: 8px;
}

.un-look-detail__meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: var(--un-text-2);
    font-size: 0.9em;
}

.un-look-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.un-look-difficulty::before {
    content: "◆ ";
    font-size: 0.7em;
}

/* ── Image slideshow ─────────────────────────────────────────────────────── */

.un-look-slideshow {
    position: relative;
    margin-bottom: 24px;
    border-radius: var(--un-radius);
    overflow: hidden;
    background: var(--un-bg-soft);
}

.un-look-slideshow__track {
    position: relative;
}

.un-look-slideshow__slide {
    display: none;
}
.un-look-slideshow__slide:first-child {
    display: block;
}
.un-look-slideshow__slide img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    display: block;
}

.un-slideshow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--un-veil);
    color: var(--un-white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.4em;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    transition: background .2s;
}
.un-slideshow-arrow:hover {
    background: rgba(0,0,0,.7);
}
.un-slideshow-prev { left: 12px; }
.un-slideshow-next { right: 12px; }

.un-slideshow-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.un-slideshow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}
.un-slideshow-dot.is-active {
    background: var(--un-white);
}

/* ── Two-column layout ───────────────────────────────────────────────────── */

.un-look-detail__two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.un-look-detail__two-col h2 {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--un-border);
}

.un-look-prose {
    color: var(--un-text);
    line-height: 1.65;
    font-size: 0.95em;
}

.un-look-steps {
    padding-left: 1.2em;
    margin: 0;
}
.un-look-steps li {
    margin-bottom: 8px;
    line-height: 1.5;
}

@media (max-width: 680px) {
    .un-look-detail__two-col {
        grid-template-columns: 1fr;
    }
}

/* ── Author box ──────────────────────────────────────────────────────────── */

.un-look-author-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--un-bg-soft);
    border-radius: var(--un-radius);
    margin-bottom: 28px;
}

.un-look-author-box__avatar {
    position: relative;
    flex-shrink: 0;
}

.un-look-author-box__avatar img {
    border-radius: 50%;
    display: block;
}

.un-look-rank-badge {
    position: absolute;
    top: -4px;
    left: -8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--un-rose);
    color: var(--un-white);
    font-size: 0.65em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--un-radius);
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Rank medal icon — square (never clipped by the round-avatar rules), sized
 * to sit inline next to the rank label or author name. */
.un-rank-icon {
    flex-shrink: 0;
    vertical-align: middle;
}
/* Same treatment as the pane rank pill: the medal caps the badge instead of
 * sitting a few pixels inside it — no left padding, and the icon bleeds over
 * the 2px vertical padding so its circle fills the badge height. :has() keeps
 * the normal padding on a badge that carries no tier art. */
.un-look-rank-badge:has(.un-rank-icon) {
    padding-left: 0;
}
.un-look-rank-badge .un-rank-icon {
    width: 20px;
    height: 20px;
    margin-block: -2px;
    border-radius: 0;
}
.un-look-card__author .un-rank-icon {
    width: 18px;
    height: 18px;
    border-radius: 0;
}

.un-look-author-box__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.un-look-author-box__name {
    font-size: 1em;
    font-weight: 600;
}

.un-look-author-box__link {
    font-size: 0.9em;
}

/* ── Tips & Tricks ───────────────────────────────────────────────────────── */

.un-look-tips {
    background: var(--un-rose-bg);
    border: 1px solid var(--un-rose-divider);
    border-radius: var(--un-radius);
    padding: 18px 24px;
    margin-bottom: 28px;
}

.un-look-tips h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1em;
    font-weight: 700;
    /* !important: Elementor's WC My Account widget forces margin-top: 30px on
       h2:first-of-type with spec 0,5,1; targeted override keeps the tips box
       balanced regardless of which h2 comes first in the account content. */
    margin: 0 0 10px !important;
    color: var(--un-rose);
}

.un-look-tips__icon {
    flex-shrink: 0;
    color: var(--un-rose);
}

.un-look-tips .un-look-prose,
.un-look-tips .un-look-prose p {
    margin: 0;
}

/* ── Social bar ──────────────────────────────────────────────────────────── */

.un-look-social-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid var(--un-border);
    border-bottom: 1px solid var(--un-border);
    margin-bottom: 32px;
}

.un-look-social-bar__stats {
    display: flex;
    gap: 16px;
}

.un-social-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: var(--un-text);
}

.un-social-icon {
    font-size: 1.1em;
}

.un-look-social-bar__share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.un-share-label {
    font-size: 0.85em;
    color: var(--un-text-2);
}

.un-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--un-bg-soft);
    color: var(--un-text);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.un-share-btn:hover {
    background: var(--un-rose);
    color: var(--un-white);
}

/* ── Linked collection section ───────────────────────────────────────────── */

.un-look-collection {
    margin-bottom: 40px;
}
.un-look-collection h2 {
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 16px;
}

/* ── Look card ───────────────────────────────────────────────────────────── */

.un-look-card {
    border: 1px solid var(--un-border);
    border-radius: var(--un-radius);
    overflow: hidden;
    background: var(--un-white);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.un-look-card:hover {
    box-shadow: var(--un-shadow-2);
}

.un-look-card__image-link {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--un-bg-soft);
}

.un-look-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.un-look-card:hover .un-look-card__image {
    transform: scale(1.04);
}

.un-look-card__image--placeholder {
    background: linear-gradient(135deg, var(--un-bg-soft) 0%, var(--un-border) 100%);
}

.un-look-card__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.un-look-card__title {
    font-size: 0.95em;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}
.un-look-card__title a {
    color: inherit;
    text-decoration: none;
}
.un-look-card__title a:hover {
    text-decoration: underline;
}

.un-look-card__author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82em;
    color: var(--un-text-2);
}
.un-look-card__author img {
    border-radius: 50%;
}

.un-look-card__cta {
    margin-top: auto;
    font-size: 0.85em;
    text-align: center;
    display: block;
}

/* ── Linked looks widget ─────────────────────────────────────────────────── */

.un-linked-looks {
    margin-top: 32px;
}

.un-linked-looks__title {
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 16px;
}

.un-linked-looks__grid {
    display: grid;
    gap: 20px;
}

.un-linked-looks.layout-grid .un-linked-looks__grid {
    grid-template-columns: repeat(3, 1fr);
}

.un-linked-looks.layout-list .un-linked-looks__grid {
    grid-template-columns: 1fr;
}
.un-linked-looks.layout-list .un-look-card {
    flex-direction: row;
}
.un-linked-looks.layout-list .un-look-card__image-link {
    width: 100px;
    aspect-ratio: unset;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .un-linked-looks.layout-grid .un-linked-looks__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .un-linked-looks.layout-grid .un-linked-looks__grid {
        grid-template-columns: 1fr;
    }
}

/* ── UN Looks Loop widget ────────────────────────────────────────────────── */

.un-looks-loop {
    margin: 0 0 32px;
}

.un-looks-loop__title {
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 0 20px;
}

.un-looks-loop__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.un-looks-loop__empty {
    color: var(--un-text-2);
    font-style: italic;
}

.un-looks-loop__pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.un-looks-loop__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--un-border);
    border-radius: var(--un-radius);
    text-decoration: none;
    color: var(--un-text);
}
.un-looks-loop__pagination .page-numbers.current {
    background: var(--un-black);
    color: var(--un-white);
    border-color: var(--un-black);
}

/* ── Look detail — interactive "Reproduisez ce look" kit selector ────────── */

/* Reuses the panier's .un-look-repro__pill + .un-reco carousel (from
   un-collection-frontend.css / un-recommendations.css). No hero card here — the
   look's image/author/title already sit at the top of the page. */
.un-look-products {
    overflow: visible;
}

/* Live incentive message above the slim pill. */
.un-look-products__msg {
    font-size: 0.85em;
    color: var(--un-text-2);
    margin: 0;
    min-height: 0;
    line-height: 1.4;
}
.un-look-products__msg:empty {
    display: none;
}

/* Selection checkbox overlaid on each compact product card. */
.un-reco__check {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    display: inline-flex;
    margin: 0;
    cursor: pointer;
}
.un-reco__check input {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--un-black);
    background: var(--un-white);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
}

/* Greyed state when a card is deselected (toggled by un-collection-frontend.js). */
.un-look-products .un-reco__cell.is-deselected .chromalab-results__card {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .un-looks-loop__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .un-looks-loop__grid {
        grid-template-columns: 1fr;
    }
}

/* ── Status badges (shared admin + frontend) ─────────────────────────────── */

.un-look-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--un-radius);
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}
.un-look-badge--draft     { background: var(--un-bg-soft); color: var(--un-text); }
.un-look-badge--pending   { background: var(--un-warning-bg); color: var(--un-warning); }
.un-look-badge--approved  { background: var(--un-success-bg); color: var(--un-success); }
.un-look-badge--denied    { background: var(--un-error-bg); color: var(--un-error); }
.un-look-badge--planned   { background: var(--un-info-bg); color: var(--un-info); }
.un-look-badge--published { background: var(--un-success-bg); color: var(--un-success); }

.un-denial-reason {
    display: block;
    font-style: italic;
    font-size: 0.8em;
    color: var(--un-error);
    margin-top: 3px;
}

/* ── My Looks (My Account) ───────────────────────────────────────────────── */

.un-my-looks__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.un-my-looks__header h2 {
    margin: 0;
}

/* ── Preview bar ─────────────────────────────────────────────────────────── */

.un-look-preview-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,.97);
    border-top: 2px solid var(--un-border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
