.rk-softphone,
.rk-softphone * {
    box-sizing: border-box;
}

[data-support-call] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.12);
}

/* Match the adjacent Sign Up Now! button's shape and sizing while using the
   requested yellow / black palette. */
.btn.support-call-cta,
a.btn.support-call-cta,
.cs1 .btn.support-call-cta,
.cs1 a.btn.support-call-cta {
    color: #000 !important;
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
}

.cs1 .btn.btn-primary.support-call-cta:hover,
.cs1 .btn.btn-primary.support-call-cta:focus,
.cs1 .btn.btn-primary.support-call-cta:active,
.btn.support-call-cta:hover,
.btn.support-call-cta:focus,
.btn.support-call-cta:active {
    color: #000 !important;
    background-color: #e0a800 !important;
    border-color: #d39e00 !important;
}

.support-call-cta .fa-phone {
    margin-right: 8px;
}

.rk-softphone__end,
.rk-softphone__close {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.rk-softphone[hidden] {
    display: none !important;
}

.rk-softphone {
    --rk-red: #e9435a;
    --rk-red-hover: #bd2e42;
    --rk-navy: #1d2b48;
    --rk-navy-deep: #12192c;
    --rk-muted: #cacdd8;
    position: fixed;
    right: 20px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    /* One step above the Shelby launcher's 2147483000 stacking tier. */
    z-index: 2147483001;
    width: 296px;
    max-width: calc(100vw - 24px);
    overflow: hidden;
    color: #fff;
    background: var(--rk-navy-deep);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34), 0 4px 14px rgba(0, 0, 0, 0.2);
    font-family: FuturaPT-Book, Roboto, Arial, sans-serif;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transform-origin: bottom right;
    transition: opacity 180ms ease, transform 180ms ease;
}

.rk-softphone.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.rk-softphone__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: linear-gradient(135deg, var(--rk-navy) 0%, var(--rk-navy-deep) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rk-softphone__mark {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--rk-red);
    background: rgba(233, 67, 90, 0.14);
    border-radius: 50%;
}

.rk-softphone__identity {
    min-width: 0;
    flex: 1 1 auto;
}

.rk-softphone__eyebrow {
    margin-bottom: 2px;
    color: var(--rk-muted);
    font-family: FuturaPT-Bold, FuturaBT-Medium, Roboto, Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.rk-softphone__number {
    overflow: hidden;
    color: #fff;
    font-family: FuturaBT-Medium, FuturaPT-Medium, Roboto, Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rk-softphone__live {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    background: #f0b429;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(240, 180, 41, 0.12);
}

.rk-softphone.is-connecting .rk-softphone__live {
    animation: rk-softphone-pulse 1.4s ease-out infinite;
}

.rk-softphone.is-live .rk-softphone__live {
    background: #35c38b;
    box-shadow: 0 0 0 4px rgba(53, 195, 139, 0.14);
    animation: none;
}

.rk-softphone.is-ending .rk-softphone__live,
.rk-softphone.is-ended .rk-softphone__live,
.rk-softphone.is-error .rk-softphone__live {
    display: none;
    background: #737985;
    box-shadow: none;
    animation: none;
}

.rk-softphone__close {
    position: absolute;
    top: 9px;
    right: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--rk-muted);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.rk-softphone.is-ended .rk-softphone__close,
.rk-softphone.is-error .rk-softphone__close {
    display: inline-flex;
}

.rk-softphone__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.rk-softphone__close:focus {
    outline: none;
}

.rk-softphone__close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 2px;
}

.rk-softphone__body {
    padding: 4px 16px 18px;
    text-align: center;
}

.rk-softphone__status {
    min-height: 18px;
    color: var(--rk-muted);
    font-size: 12px;
    line-height: 1.45;
}

.rk-softphone__timer {
    margin: 12px 0 18px;
    color: #fff;
    font-family: FuturaBT-Medium, FuturaPT-Medium, "Courier New", monospace;
    font-size: 38px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
}

.rk-softphone__fallback {
    margin: -4px 0 14px;
    color: var(--rk-muted);
    font-size: 12px;
    line-height: 1.45;
}

.rk-softphone__fallback a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rk-softphone__fallback a:hover,
.rk-softphone__fallback a:focus {
    color: #fff;
}

.rk-softphone__end {
    display: block;
    width: calc(100% - 28px);
    min-height: 46px;
    margin: 0 14px 14px;
    padding: 11px 16px;
    color: #fff;
    background: var(--rk-red);
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    cursor: pointer;
    font-family: FuturaPT-Bold, FuturaBT-Medium, Roboto, Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 150ms ease, transform 150ms ease;
}

.rk-softphone__end:hover {
    background: var(--rk-red-hover);
}

.rk-softphone__end:active {
    transform: translateY(1px);
}

.rk-softphone__end:focus {
    outline: none;
}

.rk-softphone__end:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

.rk-softphone__end:disabled {
    cursor: default;
    opacity: 0.7;
}

.rk-softphone.is-ended .rk-softphone__end,
.rk-softphone.is-error .rk-softphone__end {
    color: var(--rk-navy);
    background: #fff;
}

.rk-softphone.is-ended .rk-softphone__end:hover,
.rk-softphone.is-error .rk-softphone__end:hover {
    background: #eaecf0;
}

.rk-softphone__audio {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

@keyframes rk-softphone-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.45);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(240, 180, 41, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(240, 180, 41, 0);
    }
}

@media (max-width: 480px) {
    .rk-softphone {
        right: 12px;
        bottom: calc(82px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        width: auto;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rk-softphone,
    .rk-softphone__end {
        transition: none;
    }

    .rk-softphone.is-connecting .rk-softphone__live {
        animation: none;
    }
}
