/* ============================================================
   Achrowe Voice Agent — Premium Compact UI
   ============================================================ */

.achrowe-voice-section {
    --achrowe-accent:     #6366f1;
    --achrowe-accent2:    #8b5cf6;
    --achrowe-accent3:    #a78bfa;
    --achrowe-accent-rgb: 99,102,241;
    position: relative;
    padding: 80px 24px 90px;
    text-align: center;
    background: #f8f9ff;
    overflow: hidden;
}

.achrowe-voice-section__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 60% at 50% 40%, rgba(var(--achrowe-accent-rgb),0.06) 0%, transparent 70%);
    pointer-events: none;
}

.achrowe-voice-section__inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Label chip ────────────────────────────── */
.achrowe-label-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 18px;
    background: rgba(var(--achrowe-accent-rgb),0.07);
    border: 1px solid rgba(var(--achrowe-accent-rgb),0.22);
    border-radius: 100px;
    color: var(--achrowe-accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 0 20px;
    text-transform: uppercase;
}

.achrowe-label-chip::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--achrowe-accent);
    animation: achrowe-dot-blink 1.8s ease-in-out infinite;
}

@keyframes achrowe-dot-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

/* ── Headings ──────────────────────────────── */
.achrowe-section-heading {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.13;
    margin: 0 0 14px;
    letter-spacing: -1.2px;
}

.achrowe-heading-highlight {
    background: linear-gradient(135deg, var(--achrowe-accent) 0%, var(--achrowe-accent2) 60%, var(--achrowe-accent3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.achrowe-section-subheading {
    color: #64748b;
    font-size: 0.97rem;
    line-height: 1.68;
    margin: 0 0 16px;
    max-width: 460px;
}

/* ── Widget container (must center everything) */
.achrowe-voice-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* ── Mic area ──────────────────────────────── */
.achrowe-mic-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* Soft filled rings */
.achrowe-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: achrowe-breathe 3s ease-in-out infinite;
}
.achrowe-ring--1 {
    width: 104px; height: 104px;
    background: rgba(var(--achrowe-accent-rgb),0.10);
    animation-delay: 0s;
}
.achrowe-ring--2 {
    width: 148px; height: 148px;
    background: rgba(var(--achrowe-accent-rgb),0.055);
    animation-delay: 0.45s;
}
.achrowe-ring--3 {
    width: 192px; height: 192px;
    background: rgba(var(--achrowe-accent-rgb),0.025);
    animation-delay: 0.9s;
}

@keyframes achrowe-breathe {
    0%, 100% { transform: scale(0.97); opacity: 0.7; }
    50%       { transform: scale(1.03); opacity: 1; }
}

/* ── Mic button ────────────────────────────── */
.achrowe-mic-btn {
    position: relative;
    z-index: 10;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--achrowe-accent), var(--achrowe-accent2));
    box-shadow:
        0 4px 8px  rgba(var(--achrowe-accent-rgb),0.18),
        0 12px 28px rgba(var(--achrowe-accent-rgb),0.28),
        0 20px 44px rgba(var(--achrowe-accent-rgb),0.12);
    transition:
        transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.3s ease,
        background 0.35s ease;
}

.achrowe-mic-btn:hover {
    transform: scale(1.08);
    box-shadow:
        0 4px 10px  rgba(var(--achrowe-accent-rgb),0.22),
        0 16px 38px rgba(var(--achrowe-accent-rgb),0.42),
        0 28px 56px rgba(var(--achrowe-accent-rgb),0.16);
}

.achrowe-mic-btn:active { transform: scale(0.94); }

.achrowe-mic-btn::after {
    content: '';
    position: absolute;
    top: -40%;
    left: -55%;
    width: 70%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: rotate(20deg);
    border-radius: 50%;
    animation: achrowe-shine 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes achrowe-shine {
    0%, 60%, 100% { left: -55%; opacity: 0; }
    45%            { left: 130%; opacity: 1; }
}

.achrowe-mic-btn svg {
    width: 32px; height: 32px;
    fill: #fff;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* ── Status text ───────────────────────────── */
.achrowe-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 28px;
}

.achrowe-status__text {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    transition: color 0.3s;
}

.achrowe-status__sub {
    color: #94a3b8;
    font-size: 0.78rem;
    margin: 0;
    transition: opacity 0.3s;
}

/* ── Industry nav ──────────────────────────── */
.achrowe-industry-nav {
    width: 100%;
    padding-top: 22px;
    border-top: 1px solid rgba(var(--achrowe-accent-rgb),0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.achrowe-industry-nav__label {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
}

/* ── Industry tags row ─────────────────────── */
.achrowe-industry-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0;
}

.achrowe-industry-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    color: #374151;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.22s ease;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

.achrowe-industry-tag::after {
    content: '→';
    font-size: 0.78rem;
    opacity: 0.35;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin-left: 2px;
}

.achrowe-industry-tag:hover {
    border-color: var(--achrowe-accent);
    color: var(--achrowe-accent);
    background: rgba(var(--achrowe-accent-rgb),0.05);
    box-shadow: 0 6px 18px rgba(var(--achrowe-accent-rgb),0.14);
    transform: translateY(-2px);
    text-decoration: none;
}

.achrowe-industry-tag:hover::after {
    opacity: 1;
    transform: translateX(4px);
}

.achrowe-industry-tag span.icon {
    font-size: 1rem;
    line-height: 1;
}

/* ── State: connecting ─────────────────────── */
.achrowe-voice-widget[data-state="connecting"] .achrowe-mic-btn {
    animation: achrowe-glow-pulse 1.3s ease-in-out infinite;
}
.achrowe-voice-widget[data-state="connecting"] .achrowe-status__text { color: var(--achrowe-accent); }

@keyframes achrowe-glow-pulse {
    0%,100% { box-shadow: 0 4px 8px rgba(var(--achrowe-accent-rgb),0.2), 0 12px 28px rgba(var(--achrowe-accent-rgb),0.28); }
    50%      { box-shadow: 0 4px 10px rgba(var(--achrowe-accent-rgb),0.3), 0 16px 44px rgba(var(--achrowe-accent-rgb),0.55), 0 0 0 14px rgba(var(--achrowe-accent-rgb),0.07); }
}

/* ── State: active ─────────────────────────── */
.achrowe-voice-widget[data-state="active"] .achrowe-mic-btn,
.achrowe-voice-widget[data-state="speaking"] .achrowe-mic-btn {
    background: linear-gradient(145deg, #f43f5e, #ef4444);
    box-shadow: 0 4px 8px rgba(244,63,94,0.2), 0 12px 30px rgba(244,63,94,0.35), 0 20px 44px rgba(244,63,94,0.12);
}
.achrowe-voice-widget[data-state="active"] .achrowe-ring--1,
.achrowe-voice-widget[data-state="active"] .achrowe-ring--2,
.achrowe-voice-widget[data-state="active"] .achrowe-ring--3,
.achrowe-voice-widget[data-state="speaking"] .achrowe-ring--1,
.achrowe-voice-widget[data-state="speaking"] .achrowe-ring--2,
.achrowe-voice-widget[data-state="speaking"] .achrowe-ring--3 {
    background: rgba(244,63,94,0.06);
    animation-duration: 1.1s;
}
.achrowe-voice-widget[data-state="active"] .achrowe-icon-mic,
.achrowe-voice-widget[data-state="speaking"] .achrowe-icon-mic  { display: none; }
.achrowe-voice-widget[data-state="active"] .achrowe-icon-stop,
.achrowe-voice-widget[data-state="speaking"] .achrowe-icon-stop { display: block !important; }

.achrowe-voice-widget[data-state="active"]   .achrowe-status__text { color: #f43f5e; }
.achrowe-voice-widget[data-state="speaking"] .achrowe-status__text { color: #8b5cf6; }

/* ── State: ended ──────────────────────────── */
.achrowe-voice-widget[data-state="ended"] .achrowe-ring--1,
.achrowe-voice-widget[data-state="ended"] .achrowe-ring--2,
.achrowe-voice-widget[data-state="ended"] .achrowe-ring--3 { opacity: 0; animation: none; }

.achrowe-voice-widget[data-state="ended"] .achrowe-mic-btn {
    background: #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    cursor: default; pointer-events: none;
}
.achrowe-voice-widget[data-state="ended"] .achrowe-mic-btn svg { fill: #94a3b8; filter: none; }
.achrowe-voice-widget[data-state="ended"] .achrowe-status__text { color: #94a3b8; }
.achrowe-voice-widget[data-state="ended"] .achrowe-industry-tags { display: none; }

/* Hide sub text when not idle */
.achrowe-voice-widget[data-state="connecting"] .achrowe-status__sub,
.achrowe-voice-widget[data-state="active"]     .achrowe-status__sub,
.achrowe-voice-widget[data-state="speaking"]   .achrowe-status__sub,
.achrowe-voice-widget[data-state="ended"]      .achrowe-status__sub { opacity: 0; pointer-events: none; }

/* ── Wave bars ─────────────────────────────── */
.achrowe-wave-bars {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 44px;
    margin: 10px 0 6px;
}
.achrowe-voice-widget[data-state="active"]   .achrowe-wave-bars,
.achrowe-voice-widget[data-state="speaking"] .achrowe-wave-bars { display: flex; }

.achrowe-wave-bars span {
    display: block;
    width: 3px;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--achrowe-accent2), var(--achrowe-accent));
    animation: achrowe-wave 1.4s ease-in-out infinite;
    transform-origin: center;
}
.achrowe-wave-bars span:nth-child(1)  { height:  8px; animation-delay: 0.00s; }
.achrowe-wave-bars span:nth-child(2)  { height: 16px; animation-delay: 0.10s; }
.achrowe-wave-bars span:nth-child(3)  { height: 26px; animation-delay: 0.20s; }
.achrowe-wave-bars span:nth-child(4)  { height: 36px; animation-delay: 0.30s; }
.achrowe-wave-bars span:nth-child(5)  { height: 42px; animation-delay: 0.40s; }
.achrowe-wave-bars span:nth-child(6)  { height: 44px; animation-delay: 0.50s; }
.achrowe-wave-bars span:nth-child(7)  { height: 42px; animation-delay: 0.40s; }
.achrowe-wave-bars span:nth-child(8)  { height: 36px; animation-delay: 0.30s; }
.achrowe-wave-bars span:nth-child(9)  { height: 26px; animation-delay: 0.20s; }
.achrowe-wave-bars span:nth-child(10) { height: 16px; animation-delay: 0.10s; }
.achrowe-wave-bars span:nth-child(11) { height:  8px; animation-delay: 0.00s; }

.achrowe-wave-bars.is-speaking span {
    background: linear-gradient(180deg, var(--achrowe-accent3), var(--achrowe-accent2));
    animation-duration: 0.45s;
}

@keyframes achrowe-wave {
    0%,100% { transform: scaleY(0.2); opacity: 0.4; }
    50%      { transform: scaleY(1);   opacity: 1; }
}

/* ── CTA card ──────────────────────────────── */
.achrowe-cta-card {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e8edf4;
    border-radius: 20px;
    padding: 28px 32px;
    max-width: 380px;
    width: 100%;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.07);
    animation: achrowe-slide-up 0.45s cubic-bezier(0.22,1,0.36,1) forwards;
    overflow: hidden;
    position: relative;
}
.achrowe-voice-widget[data-state="ended"] .achrowe-cta-card { display: flex; }

.achrowe-cta-card__accent {
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, var(--achrowe-accent), var(--achrowe-accent2));
    border-radius: 3px;
    margin-bottom: 4px;
}

.achrowe-cta-card__title {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.achrowe-cta-card__sub {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

.achrowe-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--achrowe-accent), var(--achrowe-accent2));
    color: #fff !important;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease;
    box-shadow: 0 4px 14px rgba(var(--achrowe-accent-rgb),0.3);
}
.achrowe-cta-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 24px rgba(var(--achrowe-accent-rgb),0.44);
}

.achrowe-restart-btn {
    background: none;
    border: 1.5px solid #e2e8f0;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}
.achrowe-restart-btn:hover {
    border-color: var(--achrowe-accent);
    color: var(--achrowe-accent);
    background: rgba(var(--achrowe-accent-rgb),0.04);
}

@keyframes achrowe-slide-up {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 640px) {
    .achrowe-voice-section { padding: 60px 20px 72px; }
    .achrowe-section-heading { letter-spacing: -0.8px; }
    .achrowe-mic-wrap { width: 176px; height: 176px; }
    .achrowe-ring--3  { width: 172px; height: 172px; }
    .achrowe-ring--2  { width: 132px; height: 132px; }
    .achrowe-ring--1  { width: 94px;  height: 94px;  }
    .achrowe-cta-card { padding: 22px 20px; }
    .achrowe-industry-tags { gap: 8px; }
    .achrowe-industry-tag  { font-size: 0.78rem; padding: 7px 13px; }
}