/**
 * EVA Configurator — structural skeleton CSS (plugin-level, Phase 3).
 *
 * THIS FILE: display/flex/grid skeleton ONLY — no colors, fonts, radii, spacing.
 * All visual design lives in the child theme (matcustom.css §11).
 *
 * BEM: .eva-configurator .eva-wizard .eva-wizard__* .eva-choice
 */

/* ---- Root ---- */
.eva-configurator.eva-wizard {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ---- Stepper ---- */
.eva-wizard__stepper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    overflow: hidden;
}

.eva-wizard__stepper-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.eva-wizard__stepper-node:disabled {
    cursor: default;
}

.eva-wizard__stepper-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Number shown when pending/active; check shown when done */
.eva-wizard__stepper-node--done    .eva-wizard__stepper-num   { display: none; }
.eva-wizard__stepper-node--done    .eva-wizard__stepper-check { display: block; }
.eva-wizard__stepper-node:not(.eva-wizard__stepper-node--done) .eva-wizard__stepper-check { display: none; }
.eva-wizard__stepper-node:not(.eva-wizard__stepper-node--done) .eva-wizard__stepper-num   { display: block; }

.eva-wizard__stepper-label {
    display: block;
}

/* ---- Steps ---- */
.eva-wizard__step {
    display: flex;
    flex-direction: column;
}

.eva-wizard__step[hidden] {
    display: none;
}

.eva-wizard__step--active {
    display: flex;
}

/* ---- Choice grids ---- */
.eva-wizard__choices {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Swatch grids get multi-column on wider viewport — overridden in theme CSS. */
.eva-wizard__choices--mat-color,
.eva-wizard__choices--edge-color {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 360px base: 3 cols */
}

.eva-wizard__choices--kit,
.eva-wizard__choices--heelpad {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

/* ---- Choice item ---- */
.eva-choice {
    display: flex;
    position: relative;
}

/* Visually hidden native radio; interaction via label */
.eva-choice__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.eva-choice__label {
    display: flex;
    flex-direction: column;
    width: 100%;
    cursor: pointer;
    position: relative;
}

.eva-choice--wide .eva-choice__label {
    flex-direction: row;
    align-items: flex-start;
}

.eva-choice__body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.eva-choice__chips {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

/* Swatch square: aspect-ratio 1:1 relative to column width */
.eva-choice__swatch-square {
    display: block;
    position: relative;
    aspect-ratio: 1;
    background-color: var(--swatch-color, #888);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Когда плашка показывает реальное фото текстуры — прячем декоративный hex */
.eva-choice__swatch-square.has-texture .eva-choice__swatch-pattern { display: none; }

/* Honeycomb pattern overlay — для тех плашек, где фото нет (fallback) и
   для шага 5 (кант). Только декоративный шум поверх цвета. */
.eva-choice__swatch-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23'%3E%3Cpolygon points='10,1 19,6 19,17 10,22 1,17 1,6' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 20px 23px;
    pointer-events: none;
}

.eva-choice__swatch-check {
    position: absolute;
    top: 4px;
    right: 4px;
    display: none;
}

/* ============================================================
   Step 4 — Texture cards (Соти / Ромби / Капля)
   Идентично виду «Типи матеріалу» на главной, но с radio behind.
   ============================================================ */
.eva-wizard__choices--textures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

/* На любой ширине — 3 в ряд. Карточки масштабируются. */
@media (max-width: 480px) {
    .eva-wizard__choices--textures { gap: 6px; }
}

.eva-tex-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 4;         /* выше (мобильный) — крупнее карточка */
    min-height: 180px;
    border: 2px solid transparent;
    background: #0b0b0e;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
}

@media (min-width: 640px) {
    .eva-tex-card {
        aspect-ratio: 1;         /* квадратные на десктопе */
        border-radius: 16px;
        min-height: 220px;
    }
}

.eva-tex-card .eva-choice__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.eva-tex-card__label {
    display: block;
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.eva-tex-card__img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.eva-tex-card__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 38px 10px 10px;
    background: linear-gradient(
        0deg,
        rgba(10, 10, 12, 0.96) 0%,
        rgba(10, 10, 12, 0.85) 45%,
        rgba(10, 10, 12, 0.4) 80%,
        transparent 100%
    );
    color: #F5F5F7;
}

.eva-tex-card__name {
    display: block;
    font-weight: 700;
    font-size: 0.9375rem;       /* было 0.8125 — крупнее */
    line-height: 1.2;
    margin-bottom: 2px;
}

.eva-tex-card__sub {
    display: block;
    font-size: 0.8125rem;       /* было 0.6875 — крупнее */
    line-height: 1.2;
    color: #E8A85B;
}

@media (min-width: 640px) {
    .eva-tex-card__overlay  { padding: 60px 16px 16px; }
    .eva-tex-card__name     { font-size: 1.125rem; }
    .eva-tex-card__sub      { font-size: 0.9375rem; }
}

/* Уменьшим чек-кружок на узких карточках */
.eva-tex-card.eva-choice--selected::after {
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
}

@media (min-width: 640px) {
    .eva-tex-card.eva-choice--selected::after {
        top: 10px;
        right: 10px;
        width: 28px;
        height: 28px;
    }
}

.eva-tex-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Выбранная карточка — золотая обводка + чек */
.eva-tex-card.eva-choice--selected {
    border-color: #E8A85B;
    box-shadow: 0 0 0 2px rgba(232, 168, 91, 0.28), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.eva-tex-card.eva-choice--selected::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #E8A85B url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 7L6 10L11 4' stroke='%231A1505' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center / 60% no-repeat;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Подпись «Колір» между карточками и палитрой */
.eva-mat-color__hint {
    margin-top: 12px !important;
    margin-bottom: 8px !important;
    color: #9A9AA8;
    font-size: 0.9375rem;
    font-weight: 600;
}

.eva-choice__input:checked ~ .eva-choice__label .eva-choice__swatch-check,
.eva-choice--selected .eva-choice__swatch-check {
    display: block;
}

/* ---- Summary ---- */
.eva-wizard__summary[hidden] {
    display: none;
}

.eva-wizard__summary {
    display: flex;
    flex-direction: column;
}

.eva-wizard__summary-list {
    display: flex;
    flex-direction: column;
}

.eva-wizard__summary-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/* ---- Sticky nav footer ---- */
.eva-wizard__nav {
    display: flex;
    flex-direction: column;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.eva-wizard__nav-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.eva-wizard__nav-back[hidden],
.eva-wizard__nav-next[hidden] {
    display: none;
}

/* ---- Notice ---- */
.eva-configurator__notice {
    display: none;
}

.eva-configurator__notice:not(:empty) {
    display: block;
}

/* ---- Auto select wrappers ---- */
.eva-wizard__autoselect {
    display: flex;
    flex-direction: column;
}

.eva-configurator__field[hidden] {
    display: none;
}

/* ---- Utilities ---- */
.eva-notice--success { /* styled by theme */ }
.eva-notice--error   { /* styled by theme */ }
