.hcr-help-webrtc-modal button {
    line-height: 1;
    font-size: 16px;
    cursor: pointer;
}

.hcr-help-webrtc-modal input {
    cursor: pointer;
}

button.hcr-help-webrtc-button-place-call {
    color: #FFFFFF;
    background-color: #0072BC;
    border: 1px solid #0072BC;
    border-radius: 5px;
    font-size: 20px;
    text-align: center;
    display: block;
    margin: 20px auto;
}

.hcr-help-webrtc-button-primary {
    color: #FFFFFF;
    background-color: #0072BC;
    border: 1px solid #0072BC;
    border-radius: 5px;
}

button.hcr-help-webrtc-button-inverted-primary {
    color: #0072BC;
    background-color: #FFFFFF;
    border: 1px solid #0072BC;
    border-radius: 5px;
    padding: 5px 0px;
}

button.hcr-help-webrtc-button-inverted-primary:hover,
button.hcr-help-webrtc-button-inverted-primary:focus {
    border-color: #000;
    background-color: #F2F2F2;
    color: #000;
}

.hcr-help-webrtc-management-panel-btn-alarm {
    color: #E60014;
    background-color: #FFFFFF;
    border: 1px solid #E60014;
    border-radius: 5px;
}

.hcr-help-webrtc-management-panel-btn-alarm-cancel {
    padding: 10px 12px;
}

button.hcr-help-webrtc-management-panel-btn-alarm:hover,
button.hcr-help-webrtc-management-panel-btn-alarm:focus {
    color: #FFF;
    background-color: #E60014;
}

button.hcr-help-webrtc-management-panel-btn-alarm-cancel:hover,
button.hcr-help-webrtc-management-panel-btn-alarm-cancel:focus {
    background-color: #f1aeb5;
    color: #E60014;
}

.hcr-help-webrtc-management-panel-btn-group button {
    width: 30%;
    margin: 2px;
    font-size: 18px;
    cursor: pointer;
}

.hcr-help-webrtc-management-panel-key-actions {
    margin-top: 5px;
}

.hcr-help-webrtc-management-panel-key-actions button {
    line-height: 1.1;
    padding: 10px;
}

.hcr-help-webrtc-management-panel-btn-group:after {
    content: "";
    clear: both;
    display: table;
}

.hcr-help-webrtc-button-inverted-primary {
    cursor: pointer;
}

.hcr-help-webrtc-box-outside {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hcr-help-webrtc-box-wrapper {
    background-color: #fffbea;
    border-radius: 15px;
    padding: 30px;
    min-height: 300px;
    display: block;
}

.hcr-help-webrtc-box-wrapper-inner {
    margin: 0;
}

.hcr-help-webrtc-status-box {
    border: 1px solid #333;
    background-color: #F2F2F2;
    color: #000;
    padding: 10px 12px;
    border-radius: 5px;
    display: block;
    margin-bottom: 20px;
    margin-top: 20px;
    font-size: 16px;
    line-height: 24px;
}

.hcr-help-webrtc-status-box-extra {
    border: 1px solid #ae890f;
    background-color: #f6eebf;
}

.hcr-help-webrtc-status-box.status-initiating {
    animation: pulse-call-initiating 5s infinite;
    background-color: #F2F2F2;
}

/* Loading dots animation for initiating status */
.hcr-help-webrtc-status-box.status-initiating .loading-dots {
    display: inline-block;
    margin-left: 2px;
}

.hcr-help-webrtc-status-box.status-initiating .loading-dots span {
    animation: loading-dot 1.4s infinite;
    animation-fill-mode: both;
    opacity: 0;
}

.hcr-help-webrtc-status-box.status-initiating .loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.hcr-help-webrtc-status-box.status-initiating .loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.hcr-help-webrtc-status-box.status-initiating .loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loading-dot {
    0%, 80%, 100% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
}

.hcr-help-webrtc-status-box.status-ringing {
    animation: pulse-call-ringing 5s infinite;
    border-color: #8d6f0b;
    background-color: #fdf799;
    font-weight: bold;
}

.hcr-help-webrtc-status-box.status-calling {
    animation: pulse-call-calling 5s infinite;
    border-color: #cc9a06;
    background-color: #fdf799;
    font-weight: bold;
}

.hcr-help-webrtc-status-box .pulsating-indicator {
    display: inline-block;
    animation: pulse-phone-animation 1.5s infinite ease-in-out;
    margin-left: 10px;
}

.hcr-help-webrtc-status-box.status-ended {
    font-weight: bold;
    animation: none;
    background-color: #e5f3f1;
    border-color: #00b398;
}

.hcr-help-webrtc-status-box.alert-danger {
    border-color: #f1aeb5;
    background-color: #ffefef;
}

.hcr-help-webrtc-management-panel {
    max-width: 360px;
    min-width: 300px;
    margin: 0 auto;
}

.hcr-help-webrtc-management-panel button {
    cursor: pointer;
}

.hcr-help-webrtc-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

.hcr-help-webrtc-overlay.active {
    display: flex;
}

.hcr-help-webrtc-modal {
    background: white;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 96%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

.hcr-help-webrtc-modal ::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 7px;
}

.hcr-help-webrtc-modal ::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(0, 0, 0, .3);
    box-shadow: 0 0 1px rgba(255, 255, 255, .3);
}

#hcr-help-webrtc-slide-container {
    max-height: 72vh;
    overflow-y: scroll;
    position: relative;
}

.hcr-help-webrtc-slide {
    display: none;
    text-align: center;
    padding: 10px 0 0 0;
}

.hcr-help-webrtc-slide.active {
    display: block;
}

.hcr-help-webrtc-slide h4 {
   font-size: 24px;
   font-weight: bold;
   color: #0072BC;
}

.hcr-help-webrtc-slide select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 10px;
    background-color: white;
    cursor: pointer;
}

.hcr-help-webrtc-slide select:focus {
    outline: none;
    border-color: #0072BC;
}

.hcr-help-webrtc-slide select.error {
    border-color: #E60014;
}

.hcr-help-webrtc-slide select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.hcr-help-webrtc-select-error-message {
    color: #E60014;
    font-size: 14px;
    display: none;
}

.hcr-help-webrtc-select-error-message.visible {
    display: block;
}

.hcr-help-webrtc-nav-btns {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}

.hcr-help-webrtc-nav-btns:has(.hcr-help-webrtc-modal-btn-next:only-child) {
    justify-content: flex-end;
}

.hcr-help-webrtc-modal-btn,
.hcr-help-webrtc-call-button {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hcr-help-webrtc-call-button {
    font-size: 18px;
    padding: 15px 30px;
    margin: 20px 0;
}

button.hcr-help-webrtc-call-button:hover,
button.hcr-help-webrtc-call-button:focus {
    /* transform: scale(1.05); */
    background-color: #025d9a;
    border-color: #025d9a;
}

.hcr-help-webrtc-modal-btn-next {
    background-color: #0072BC;
    color: white;
    border: none;
    position: relative;
    padding: 12px 36px 12px 12px;
}

.hcr-help-webrtc-modal-btn-next::after {
    content: '→';
    position: absolute;
    right: 12px;
    top: 45%;
    transform: translateY(-50%);
    font-size: 18px;
}

.hcr-help-webrtc-modal-btn-next:hover {
    background-color: #005a94;
}

.hcr-help-webrtc-modal-btn-prev {
    background-color: #6c757d;
    color: white;
    border: none;
    position: relative;
    padding: 12px 12px 12px 36px;
}

.hcr-help-webrtc-modal-btn-prev::before {
    content: '←';
    position: absolute;
    left: 12px;
    top: 45%;
    transform: translateY(-50%);
    font-size: 18px;
}

.hcr-help-webrtc-modal-btn-prev:hover {
    background-color: #545b62;
}

/* RTL support - swap caret positions */
[dir="rtl"] .hcr-help-webrtc-modal-btn-next,
:lang(ar) .hcr-help-webrtc-modal-btn-next,
:lang(he) .hcr-help-webrtc-modal-btn-next,
:lang(fa) .hcr-help-webrtc-modal-btn-next,
:lang(ur) .hcr-help-webrtc-modal-btn-next {
    padding: 12px 12px 12px 36px;
}

[dir="rtl"] .hcr-help-webrtc-modal-btn-next::after,
:lang(ar) .hcr-help-webrtc-modal-btn-next::after,
:lang(he) .hcr-help-webrtc-modal-btn-next::after,
:lang(fa) .hcr-help-webrtc-modal-btn-next::after,
:lang(ur) .hcr-help-webrtc-modal-btn-next::after {
    content: '←';
    right: auto;
    left: 12px;
}

[dir="rtl"] .hcr-help-webrtc-modal-btn-prev,
:lang(ar) .hcr-help-webrtc-modal-btn-prev,
:lang(he) .hcr-help-webrtc-modal-btn-prev,
:lang(fa) .hcr-help-webrtc-modal-btn-prev,
:lang(ur) .hcr-help-webrtc-modal-btn-prev {
    padding: 12px 36px 12px 12px;
}

[dir="rtl"] .hcr-help-webrtc-modal-btn-prev::before,
:lang(ar) .hcr-help-webrtc-modal-btn-prev::before,
:lang(he) .hcr-help-webrtc-modal-btn-prev::before,
:lang(fa) .hcr-help-webrtc-modal-btn-prev::before,
:lang(ur) .hcr-help-webrtc-modal-btn-prev::before {
    content: '→';
    left: auto;
    right: 12px;
}

.hcr-help-webrtc-indicators {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
}

.hcr-help-webrtc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
}

.hcr-help-webrtc-dot.active {
    background-color: #0072BC;
}

.hcr-help-webrtc-slide img {
    max-height: 170px;
    max-width: 80%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}

.hcr-help-webrtc-slide p {
    font-size: 16px;
    line-height: 1.4;
    margin: 15px 0;
    color: #333;
}

.hcr-help-webrtc-permissions-guidance {
    display: none;
}

.hcr-help-webrtc-permissions-guidance p {
    margin: 10px 0;
}

a.hcr-help-webrtc-instructions-button {
    color: #0072BC;
    text-decoration: underline;
    font-weight: bold;
}

.hcr-help-webrtc-block-preview-wrapper {
    padding: 20px;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

.hcr-help-webrtc-block-preview {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Remove hover scale effect for inline buttons (blocks/shortcodes) */
.hcr-help-webrtc-block-wrapper button.hcr-help-webrtc-trigger-modal-button:hover,
.hcr-help-webrtc-block-wrapper .hcr-help-webrtc-trigger-modal-link:hover {
    transform: none !important;
}

.hcr-help-webrtc-sticky-button {
    position: fixed;
    bottom: 18px;
    right: 18px;
    width: 60px;
    height: 60px;
    background-color: #0072BC;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 99999;
    padding: 0;
}

/* Adjust position when Play.ht button is present */
body:has(.playht-custom-audio__playFloatingBtn) .hcr-help-webrtc-sticky-button,
.hcr-help-webrtc-sticky-button.has-playht-button {
    right: 86px;
}

/* RTL support: Move sticky button to bottom left */
html[dir="rtl"] .hcr-help-webrtc-sticky-button,
[dir="rtl"] .hcr-help-webrtc-sticky-button {
    right: auto;
    left: 18px;
}

/* RTL support: Adjust sticky button position when Play.ht button is present */
html[dir="rtl"] body:has(.playht-custom-audio__playFloatingBtn) .hcr-help-webrtc-sticky-button,
html[dir="rtl"] .hcr-help-webrtc-sticky-button.has-playht-button,
[dir="rtl"] body:has(.playht-custom-audio__playFloatingBtn) .hcr-help-webrtc-sticky-button,
[dir="rtl"] .hcr-help-webrtc-sticky-button.has-playht-button {
    left: 86px;
    right: auto;
}

.hcr-help-webrtc-sticky-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.hcr-help-webrtc-sticky-button .hcr-help-webrtc-phone-icon {
    width: 24px;
    height: 24px;
    color: white;
}

.hcr-help-webrtc-sticky-button-text.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reusable phone icon */
.hcr-help-webrtc-phone-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

.hcr-help-webrtc-call-button-place-call .hcr-help-webrtc-phone-icon {
    vertical-align: top;
}

.hcr-help-webrtc-phone-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

button.hcr-help-webrtc-trigger-modal-button {
    background-color: #0072BC;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

button.hcr-help-webrtc-trigger-modal-button:hover {
    background-color: #005a94;
    transform: scale(1.05);
}

button.hcr-help-webrtc-trigger-modal-button.hcr-help-webrtc-trigger-modal-button-yellow {
    background-color: #fcf366;
    color: #000;
}

button.hcr-help-webrtc-trigger-modal-button.hcr-help-webrtc-trigger-modal-button-yellow:hover {
    background-color: #c7bb00;
}

button.hcr-help-webrtc-trigger-modal-button.hcr-help-webrtc-trigger-modal-button-blue {
    background-color: #0072BC;
    color: white;
}

button.hcr-help-webrtc-trigger-modal-button.hcr-help-webrtc-trigger-modal-button-blue:hover {
    background-color: #005a94;
}

button.hcr-help-webrtc-trigger-modal-button.hcr-help-webrtc-trigger-modal-button-gray {
    background-color: #6c757d;
    color: white;
}

button.hcr-help-webrtc-trigger-modal-button.hcr-help-webrtc-trigger-modal-button-gray:hover {
    background-color: #5a6268;
}

.hcr-help-webrtc-trigger-modal-link {
    color: #0072BC;
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
}

.hcr-help-webrtc-trigger-modal-link:hover {
    color: #005a94;
}

.hcr-help-webrtc-trigger-modal-link.hcr-help-webrtc-trigger-modal-link-yellow {
    color: #fcf366;
}

.hcr-help-webrtc-trigger-modal-link.hcr-help-webrtc-trigger-modal-link-yellow:hover {
    color: #c7bb00;
}

.hcr-help-webrtc-trigger-modal-link.hcr-help-webrtc-trigger-modal-link-blue {
    color: #0072BC;
}

.hcr-help-webrtc-trigger-modal-link.hcr-help-webrtc-trigger-modal-link-blue:hover {
    color: #005a94;
}

.hcr-help-webrtc-trigger-modal-link.hcr-help-webrtc-trigger-modal-link-gray {
    color: #6c757d;
}

.hcr-help-webrtc-trigger-modal-link.hcr-help-webrtc-trigger-modal-link-gray:hover {
    color: #5a6268;
}

.hcr-help-webrtc-modal-microphone-permissions-image-wrapper {
    margin: 20px 0;
    position: relative;
}

.hcr-help-webrtc-modal-microphone-permissions-image-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.hcr-help-webrtc-modal-microphone-permissions-image {
    max-width: 80%;
    max-height: 170px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.hcr-help-webrtc-modal-microphone-permissions-image-wrapper .text-centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 18px;
}

.hcr-help-webrtc-modal-microphone-permissions-image-wrapper .text-bottom-right {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    padding: 4px 8px;
}

button.hcr-help-webrtc-close-btn {
    position: absolute;
    top: 3px;
    right: 5px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    z-index: 100001;
}

button.hcr-help-webrtc-close-btn:hover {
    color: #000;
}

/* RTL support: Move close button to top left */
html[dir="rtl"] button.hcr-help-webrtc-close-btn,
[dir="rtl"] button.hcr-help-webrtc-close-btn {
    right: auto;
    left: 5px;
}

@keyframes pulse-call-initiating {
    0%, 100% { border-color: #333; }
    50% { border-color: #0072BC; }
}

@keyframes pulse-call-ringing {
    0%, 100% { border-color: #8d6f0b; }
    50% { border-color: #fcf366; }
}

@keyframes pulse-call-calling {
    0%, 100% { border-color: #523f03; }
    50% { border-color: #cc9a06; }
}

@keyframes pulse-call-ended {
    0%, 100% { border-color: #034809; }
    50% { border-color: #28a745; }
    /* 0%, 100% { border-color: #6c757d; }
    50% { border-color: #999; } */
}

@keyframes pulse-phone-animation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media only screen and (max-width: 500px) {
    .hcr-help-webrtc-modal {
        width: 95%;
        padding: 15px;
    }
    
    #hcr-help-webrtc-slide-container {
        max-height: 80vh;
    }
    
    .hcr-help-webrtc-slide h4 {
        font-size: 20px;
    }
    
    .hcr-help-webrtc-slide p {
        font-size: 16px;
    }

    .hcr-help-webrtc-slide img {
        max-height: 120px;
    }
}