/* ═══════════════════════════════════════════════
   Rotating Text Widget — rotating-text.css
   ═══════════════════════════════════════════════ */

/* ── WRAP ─────────────────────────────────────── */
.hhw-rt-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* размер задаётся inline через JS */
}

/* ── SVG-слой (вращается текст внутри него) ───── */
.hhw-rt-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    display: block;
}

/* ── Кнопка в центре (не вращается) ──────────── */
.hhw-rt-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;   /* default: top / bottom */
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease,
                color 0.2s ease,
                box-shadow 0.2s ease,
                transform 0.15s ease;
    /* размер через Elementor selectors */
    width: 55%;
    height: 55%;
    border-radius: 50%;
    background-color: #2563eb;
    color: #ffffff;
    overflow: hidden;
    flex-shrink: 0;
}

.hhw-rt-btn:hover {
    transform: scale(1.04);
}

/* Позиции иконки */
.hhw-rt-btn--left,
.hhw-rt-btn--right {
    flex-direction: row;
    gap: 6px;
}
.hhw-rt-btn--top,
.hhw-rt-btn--bottom {
    flex-direction: column;
    gap: 4px;
}
.hhw-rt-btn--only {
    flex-direction: column;
}
/* right / bottom — меняем порядок через order */
.hhw-rt-btn--right .hhw-rt-btn-icon,
.hhw-rt-btn--bottom .hhw-rt-btn-icon {
    order: 2;
}
.hhw-rt-btn--right .hhw-rt-btn-label,
.hhw-rt-btn--bottom .hhw-rt-btn-label {
    order: 1;
}

/* Иконка SVG */
.hhw-rt-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.hhw-rt-btn-icon svg {
    width: 28px;
    height: 28px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Текст кнопки */
.hhw-rt-btn-label {
    display: block;
    line-height: 1.2;
    text-align: center;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 600;
}

/* ── Выравнивание виджета в Elementor-колонке ── */
.elementor-widget-hhw_rotating_text .elementor-widget-container {
    display: flex;
    justify-content: center;   /* по умолчанию — центр */
}

/* Elementor alignment controls работают на .elementor-widget-container */
.elementor-widget-hhw_rotating_text.elementor-align-left .elementor-widget-container {
    justify-content: flex-start;
}
.elementor-widget-hhw_rotating_text.elementor-align-right .elementor-widget-container {
    justify-content: flex-end;
}

/* ── Fix: сброс fill от темы ─────────────────── */
/* Некоторые темы пишут svg text { fill: #xxx }   */
/* Наш inline style перебивает это, но на случай  */
/* если тема использует !important — добавляем    */
/* специфичный селектор                           */
.hhw-rt-wrap .hhw-rt-svg text,
.hhw-rt-wrap .hhw-rt-svg textPath {
    fill: inherit;          /* fallback */
}
/* Inline style на <text> (проставляется в JS)
   имеет приоритет выше любого класса без !important.
   Этот блок — дополнительная страховка. */
