/* ═══════════════════════════════════════
   Magic Types — Circular Text Widget
   ═══════════════════════════════════════ */

.mt-circle-outer {
    display: flex;
    justify-content: center;
    width: 100%;
}

.mt-circle-wrap {
    position: relative;
    width: 250px;
    height: 250px;
}

/* ── SVG circular text ── */

.mt-circle-text {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.mt-circle-text text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    fill: #222;
}

/* ── Auto-spin keyframes ── */

@keyframes mt-spin-cw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes mt-spin-ccw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

.mt-circle-wrap[data-mode="auto"][data-direction="cw"] .mt-circle-text {
    animation: mt-spin-cw var(--mt-speed, 10s) linear infinite;
}

.mt-circle-wrap[data-mode="auto"][data-direction="ccw"] .mt-circle-text {
    animation: mt-spin-ccw var(--mt-speed, 10s) linear infinite;
}

/* Scroll mode — rotation is applied via JS inline transform */
.mt-circle-wrap[data-mode="scroll"] .mt-circle-text {
    animation: none;
}

/* ── Center icon ── */

.mt-icon-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.mt-icon-center img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* Counter-rotate icon when text spins (keeps icon static) */
.mt-circle-wrap[data-mode="auto"][data-direction="cw"] .mt-icon-center:not(.mt-icon-spins) {
    /* icon stays still — no additional animation needed; it's not inside the SVG */
}

/* When icon itself should also spin */
.mt-circle-wrap[data-mode="auto"][data-direction="cw"] .mt-icon-center.mt-icon-spins {
    animation: mt-spin-cw var(--mt-speed, 10s) linear infinite;
}

.mt-circle-wrap[data-mode="auto"][data-direction="ccw"] .mt-icon-center.mt-icon-spins {
    animation: mt-spin-ccw var(--mt-speed, 10s) linear infinite;
}

/* ── Hover pause (nice UX touch) ── */

.mt-circle-wrap:hover .mt-circle-text,
.mt-circle-wrap:hover .mt-icon-center.mt-icon-spins {
    animation-play-state: paused;
}

/* ── Editor placeholder ── */

.elementor-editor-active .mt-circle-wrap {
    outline: 1px dashed rgba(0,0,0,0.1);
    border-radius: 50%;
}
