/**
 * «Гамма» — подбор пряжи по цвету: кнопка на карточках, нижний док, страница /gamma/.
 * Фирменный фиолет IrisYarn #B055C0 (как в ЛК/бонусах).
 */

/* ---------- кнопка на карточке (клон иконки сравнения) ---------- */

.iris-gamma-add {
    cursor: pointer;
    color: #77757e;
    /* клон иконки сравнения: гасим её глиф (псевдоэлементы/фон), рисуем свой svg */
    background-image: none !important;
}
.iris-gamma-add::before,
.iris-gamma-add::after {
    content: none !important;
    display: none !important;
}
.iris-gamma-add:hover {
    color: #b055c0;
}
.iris-gamma-add.is-on {
    color: #b055c0;
}
.iris-gamma-add svg {
    display: inline-block;
    vertical-align: middle;
}

/* ---------- плавающий язычок ---------- */

/* z-index выше fancybox-оверлея Aspro (99992), чтобы док был доступен из быстрого просмотра */
.iris-gamma-root {
    position: relative;
    z-index: 100000;
}
.iris-gamma-pill {
    position: fixed;
    left: 16px;
    bottom: 80px; /* выше нижнего мобильного меню темы */
    z-index: 100000;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    border: none;
    border-radius: 999px;
    background: #b055c0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(60, 20, 70, 0.28);
}
.iris-gamma-pill:hover {
    background: #9c43ac;
    color: #fff;
}
.iris-gamma-pill__icon svg {
    display: block;
}
.iris-gamma-pill__count {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #fff;
    color: #b055c0;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}

/* ---------- нижний док ---------- */

.iris-gamma-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background: #fff;
    border-top: 1px solid #e4e0e8;
    box-shadow: 0 -6px 24px rgba(60, 20, 70, 0.12);
    padding: 8px 14px 6px;
}
body.iris-gamma-dock-open {
    padding-bottom: 170px;
}

.iris-gamma-dock__head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.iris-gamma-dock__collapse {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 1px solid #e4e0e8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    position: relative;
}
.iris-gamma-dock__collapse span,
.iris-gamma-dock__collapse span::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 2px;
    background: #77757e;
    border-radius: 2px;
}
.iris-gamma-dock__collapse span {
    transform: translate(-9px, -1px) rotate(35deg);
}
.iris-gamma-dock__collapse span::after {
    transform: translate(7px, 0) rotate(-70deg);
}
.iris-gamma-dock__collapse:hover span,
.iris-gamma-dock__collapse:hover span::after {
    background: #b055c0;
}

.iris-gamma-dock__tabs {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 2px 0;
}
.iris-gamma-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border: 1px solid #e4e0e8;
    border-radius: 999px;
    background: #faf8fb;
    color: #55525c;
    font-size: 12.5px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
}
.iris-gamma-tab.is-active {
    background: #f6e9f9;
    border-color: #b055c0;
    color: #8a3a98;
    font-weight: 600;
}
.iris-gamma-tab--new {
    font-weight: 600;
}
.iris-gamma-tab__del {
    display: inline-block;
    margin-left: 2px;
    padding: 0 3px;
    color: #a8a4b0;
    font-size: 14px;
    line-height: 1;
}
.iris-gamma-tab__del:hover {
    color: #d9534f;
}
.iris-gamma-tab__ren {
    display: inline-block;
    margin-left: 2px;
    padding: 0 3px;
    color: #a86bb5;
    font-size: 12px;
    line-height: 1;
}
.iris-gamma-tab__ren:hover {
    color: #8a3a98;
}

.iris-gamma-dock__actions {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
    align-items: center;
}

.iris-gamma-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 13px;
    border: 1px solid #d8d4dd;
    border-radius: 9px;
    background: #fff;
    color: #3f3c46;
    font-size: 12.5px;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.iris-gamma-btn:hover {
    border-color: #b055c0;
    color: #8a3a98;
    text-decoration: none;
}
.iris-gamma-btn--primary,
.iris-gamma-btn--primary:hover {
    background: #b055c0;
    border-color: #b055c0;
    color: #fff;
    font-weight: 600;
}
.iris-gamma-btn--primary:hover {
    background: #9c43ac;
}
.iris-gamma-btn--ghost {
    border-color: transparent;
    color: #8f8b97;
}

.iris-gamma-dock__ribbon {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 10px 2px 4px;
    min-height: 96px;
}
.iris-gamma-dock__empty {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8f8b97;
    font-size: 13px;
    padding: 8px 4px;
}
.iris-gamma-inline-icon svg {
    vertical-align: -3px;
    color: #b055c0;
}

.iris-gamma-tile {
    position: relative;
    flex: 0 0 auto;
    width: 84px;
}
.iris-gamma-tile__img {
    display: block;
    width: 84px;
    height: 62px;
    border-radius: 9px;
    overflow: hidden;
    background: #f3f0f5;
    border: 1px solid #eceaf0;
}
.iris-gamma-tile__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.iris-gamma-tile__noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #a8a4b0;
    font-size: 11px;
}
.iris-gamma-tile__rm {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #77757e;
    font-size: 13px;
    line-height: 18px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    padding: 0;
}
.iris-gamma-tile__rm:hover {
    color: #d9534f;
}
.iris-gamma-tile__name {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.25;
    color: #55525c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iris-gamma-dock__status {
    min-height: 15px;
    font-size: 11px;
    color: #8f8b97;
    padding: 2px 2px 0;
}

/* ---------- всплывашка «Будет скоро» ---------- */

.iris-gamma-soon {
    position: absolute;
    z-index: 100001;
    background: #3f3c46;
    color: #fff;
    font-size: 12.5px;
    line-height: 1.3;
    padding: 8px 12px;
    border-radius: 9px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    max-width: 260px;
    pointer-events: none;
    animation: irisGammaSoonIn 0.15s ease-out;
}
@keyframes irisGammaSoonIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

/* ---------- страница /gamma/ ---------- */

.iris-gamma-page {
    padding: 10px 0 30px;
}
.iris-gamma-page__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.iris-gamma-page__title {
    font-size: 22px;
    font-weight: 700;
    color: #3f3c46;
}
.iris-gamma-page__count {
    font-size: 14px;
    font-weight: 400;
    color: #8f8b97;
    margin-left: 8px;
}
.iris-gamma-page__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.iris-gamma-page__loading {
    padding: 40px 0;
    text-align: center;
    color: #8f8b97;
    font-size: 14px;
}
.iris-gamma-page__empty {
    padding: 60px 20px;
    text-align: center;
    color: #55525c;
}
.iris-gamma-page__empty-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}
.iris-gamma-page__empty p {
    color: #8f8b97;
    margin-bottom: 18px;
}

/* ---------- мобильная адаптация ---------- */

@media (max-width: 767px) {
    .iris-gamma-pill {
        left: 12px;
        bottom: 80px; /* не перекрывать нижнее мобильное меню */
        padding: 9px 14px;
        font-size: 13px;
    }
    .iris-gamma-dock {
        padding: 8px 10px 6px;
    }
    .iris-gamma-dock__head {
        flex-wrap: wrap;
    }
    .iris-gamma-dock__tabs {
        order: 2;
        flex-basis: 100%;
    }
    .iris-gamma-dock__actions {
        margin-left: auto;
    }
    .iris-gamma-btn {
        padding: 7px 10px;
        font-size: 12px;
    }
    body.iris-gamma-dock-open {
        padding-bottom: 210px;
    }
    .iris-gamma-page__title {
        font-size: 18px;
    }
}
