/* Redirect Call Widgets — frontend */
.rcw-root {
    --rcw-primary: #00d46a;
    --rcw-accent: #00a855;
    --rcw-fab: #00d46a;
    --rcw-offset-x: 20px;
    --rcw-offset-y: 20px;
    --rcw-mobile-offset-y: 16px;
    --rcw-fab-size: 64px;
    --rcw-panel-width: 380px;
    --rcw-z: 99990;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

@media (max-width: 782px) {
    .rcw-root.rcw-hide-mobile {
        display: none !important;
    }
}

@media (min-width: 783px) {
    .rcw-root.rcw-hide-desktop {
        display: none !important;
    }
}

.rcw-root.rcw-pos-right {
    --rcw-side: right;
}

.rcw-root.rcw-pos-left {
    --rcw-side: left;
}

.rcw-fab {
    position: fixed;
    bottom: var(--rcw-offset-y);
    right: var(--rcw-offset-x);
    width: var(--rcw-fab-size);
    height: var(--rcw-fab-size);
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rcw-fab), var(--rcw-accent));
    color: #fff;
    cursor: pointer;
    z-index: calc(var(--rcw-z) + 2);
    display: grid;
    place-items: center;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
    transition: transform .2s ease, box-shadow .2s ease;
}

.rcw-root.rcw-pos-left .rcw-fab {
    right: auto;
    left: var(--rcw-offset-x);
}

.rcw-fab svg {
    width: 28px;
    height: 28px;
}

.rcw-fab:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .32);
}

.rcw-fab.is-open {
    transform: rotate(0deg);
}

.rcw-fab__close {
    display: none;
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 300;
}

.rcw-fab.is-open .rcw-fab__icon {
    display: none;
}

.rcw-fab.is-open .rcw-fab__close {
    display: block;
}

.rcw-fab--pulse {
    animation: rcw-pulse 2.2s ease-in-out infinite;
}

.rcw-fab--bounce {
    animation: rcw-bounce 2s ease infinite;
}

@keyframes rcw-pulse {
    0%, 100% { box-shadow: 0 14px 34px rgba(0, 0, 0, .28), 0 0 0 0 rgba(0, 212, 106, .45); }
    50% { box-shadow: 0 14px 34px rgba(0, 0, 0, .28), 0 0 0 14px rgba(0, 212, 106, 0); }
}

@keyframes rcw-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.rcw-panel {
    position: fixed;
    bottom: calc(var(--rcw-offset-y) + var(--rcw-fab-size) + 14px);
    right: var(--rcw-offset-x);
    width: min(var(--rcw-panel-width), calc(100vw - 24px));
    max-height: min(78vh, 520px);
    display: none;
    flex-direction: column;
    z-index: calc(var(--rcw-z) + 3);
    border-radius: 20px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(.98);
    transition: opacity .22s ease, transform .22s ease;
}

.rcw-root.rcw-pos-left .rcw-panel {
    right: auto;
    left: var(--rcw-offset-x);
}

.rcw-panel.is-open {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.rcw-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1rem 1rem 1.15rem;
    color: #fff;
    background: linear-gradient(135deg, var(--rcw-primary), var(--rcw-accent));
}

.rcw-panel__head-text {
    min-width: 0;
    flex: 1;
}

.rcw-panel__head strong {
    display: block;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.rcw-panel__head span {
    display: block;
    margin-top: .25rem;
    font-size: .8rem;
    line-height: 1.4;
    opacity: .94;
}

.rcw-panel__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .15s ease, transform .15s ease;
}

.rcw-panel__close:hover {
    background: rgba(255, 255, 255, .28);
    transform: scale(1.04);
}

.rcw-panel__close svg {
    width: 1rem;
    height: 1rem;
}

.rcw-panel__body {
    padding: 1rem 1rem 1.1rem;
    overflow: auto;
    background: #fff;
}

.rcw-channels {
    display: grid;
    gap: .65rem;
}

.rcw-channels--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.rcw-channels--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.rcw-channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease;
}

.rcw-channel:hover {
    transform: translateY(-2px);
}

.rcw-channel__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: #fff;
    transition: box-shadow .15s ease;
}

.rcw-channel__icon svg {
    width: 24px;
    height: 24px;
}

.rcw-channel__label {
    font-size: .68rem;
    font-weight: 600;
    text-align: center;
    color: #475569;
    line-height: 1.2;
}

.rcw-hide-labels .rcw-channel__label {
    display: none;
}

/* Icon styles */
.rcw-icons-brand .rcw-channel__icon {
    border-radius: 14px;
    background: var(--rcw-channel-color, var(--rcw-primary));
    box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
}

.rcw-icons-rounded .rcw-channel__icon {
    border-radius: 16px;
    background: color-mix(in srgb, var(--rcw-channel-color, var(--rcw-primary)) 88%, #fff);
    color: #fff;
}

.rcw-icons-circle .rcw-channel__icon {
    border-radius: 50%;
    background: var(--rcw-channel-color, var(--rcw-primary));
}

.rcw-icons-outline .rcw-channel__icon {
    border-radius: 14px;
    background: #fff;
    color: var(--rcw-channel-color, var(--rcw-primary));
    border: 2px solid color-mix(in srgb, var(--rcw-channel-color, var(--rcw-primary)) 55%, #fff);
}

.rcw-icons-mono .rcw-channel__icon {
    border-radius: 14px;
    background: color-mix(in srgb, var(--rcw-primary) 12%, #fff);
    color: var(--rcw-primary);
    border: 1px solid color-mix(in srgb, var(--rcw-primary) 25%, #fff);
}

/* Templates */
.rcw-tpl-classic .rcw-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
}

.rcw-tpl-glass .rcw-panel {
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .65);
    box-shadow: 0 24px 50px rgba(15, 23, 42, .16);
}

.rcw-tpl-glass .rcw-panel__body {
    background: rgba(255, 255, 255, .35);
}

.rcw-tpl-minimal .rcw-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
    border-radius: 14px;
}

.rcw-tpl-minimal .rcw-panel__head {
    background: #fff;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
}

.rcw-tpl-minimal .rcw-panel__head span {
    color: #64748b;
}

.rcw-tpl-neon .rcw-panel {
    background: linear-gradient(180deg, #111827, #0b1220);
    border: 1px solid rgba(0, 212, 106, .35);
    box-shadow: 0 0 0 1px rgba(0, 212, 106, .12), 0 24px 60px rgba(0, 0, 0, .45);
}

.rcw-tpl-neon .rcw-panel__body {
    background: transparent;
}

.rcw-tpl-neon .rcw-channel__label {
    color: #cbd5e1;
}

.rcw-tpl-neon .rcw-channel__icon {
    box-shadow: 0 0 18px color-mix(in srgb, var(--rcw-channel-color, var(--rcw-primary)) 55%, transparent);
}

.rcw-tpl-bubble .rcw-panel {
    background: transparent;
    box-shadow: none;
    border: none;
    width: min(320px, calc(100vw - 24px));
}

.rcw-tpl-bubble .rcw-panel__head {
    border-radius: 16px;
    margin-bottom: .65rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

.rcw-tpl-bubble .rcw-panel__body {
    padding: 0;
}

.rcw-tpl-bubble .rcw-channels {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.rcw-tpl-bubble .rcw-channel {
    flex-direction: row;
    align-items: center;
    gap: .75rem;
    padding: .7rem .85rem;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
    border: 1px solid #e2e8f0;
}

.rcw-tpl-bubble .rcw-channel__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.rcw-tpl-bubble .rcw-channel__label {
    font-size: .88rem;
    text-align: left;
}

.rcw-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .25);
    z-index: calc(var(--rcw-z) + 1);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.rcw-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

body.rcw-nav-open {
    overflow: hidden;
}

@media (max-width: 782px) {
    .rcw-fab {
        bottom: var(--rcw-mobile-offset-y);
    }

    .rcw-root.rcw-pos-left .rcw-fab {
        bottom: var(--rcw-mobile-offset-y);
    }

    .rcw-panel {
        bottom: calc(var(--rcw-mobile-offset-y) + var(--rcw-fab-size) + 12px);
    }

    .rcw-root.rcw-pos-left .rcw-panel {
        bottom: calc(var(--rcw-mobile-offset-y) + var(--rcw-fab-size) + 12px);
    }
}

@media (max-width: 480px) {
    .rcw-channels--cols-4,
    .rcw-channels--cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rcw-panel {
        width: min(var(--rcw-panel-width), calc(100vw - 20px));
        border-radius: 18px;
    }

    .rcw-channel__icon {
        width: 48px;
        height: 48px;
    }

    .rcw-channel__label {
        font-size: .64rem;
    }
}

@media print {
    .rcw-root {
        display: none !important;
    }
}