@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --oc-primary: var(--ast-global-color-0, #2C6AF4);
    --oc-primary-hover: var(--ast-global-color-1, #1a54d6);
    --oc-primary-light: color-mix(in srgb, var(--oc-primary) 8%, transparent);
    --oc-primary-08: color-mix(in srgb, var(--oc-primary) 8%, transparent);
    --oc-primary-10: color-mix(in srgb, var(--oc-primary) 10%, transparent);
    --oc-primary-12: color-mix(in srgb, var(--oc-primary) 12%, transparent);
    --oc-primary-15: color-mix(in srgb, var(--oc-primary) 15%, transparent);
    --oc-primary-20: color-mix(in srgb, var(--oc-primary) 20%, transparent);
    --oc-primary-25: color-mix(in srgb, var(--oc-primary) 25%, transparent);
    --oc-primary-35: color-mix(in srgb, var(--oc-primary) 35%, transparent);
    --oc-primary-45: color-mix(in srgb, var(--oc-primary) 45%, transparent);
    --oc-primary-90: color-mix(in srgb, var(--oc-primary) 90%, transparent);
    --oc-primary-gradient: linear-gradient(135deg, var(--oc-primary) 0%, color-mix(in srgb, var(--oc-primary) 70%, #1a54d6) 100%);
    --oc-bg-overlay: rgba(15, 23, 42, 0.45);
    --oc-bg-modal: #ffffff;
    --oc-bg-card: #ffffff;
    --oc-bg-app: #f4f4f5;
    --oc-bg-sidebar: #ffffff;
    --oc-bg-chat-stream: #eef2f5;
    --oc-border-color: #e2e8f0;
    --oc-text-dark: #0f172a;
    --oc-text-muted: #64748b;
    --oc-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

/* ==========================================================================
   Order Page Trigger Card
   ========================================================================== */
.order-chat-trigger-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--oc-border-color);
    border-left: 4px solid var(--oc-primary);
    border-radius: 16px;
    padding: 18px 24px;
    margin: 20px 0;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.order-chat-trigger-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px var(--oc-primary-12);
}

.order-chat-trigger-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.order-chat-icon-box {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--oc-primary-light);
    color: var(--oc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-chat-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

.order-chat-trigger-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--oc-text-dark);
    margin-bottom: 2px;
}

.order-chat-trigger-subtitle {
    font-size: 13px;
    color: var(--oc-text-muted);
}

.order-chat-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ast-global-color-0, var(--oc-primary, #2C6AF4));
    color: #ffffff !important;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--ast-global-color-0, #2C6AF4) 30%, transparent);
    font-family: inherit;
}

.order-chat-open-btn:hover {
    background: var(--ast-global-color-1, var(--oc-primary-hover, #1a54d6));
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--ast-global-color-0, #2C6AF4) 45%, transparent);
}

.order-chat-open-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--ast-global-color-0, #2C6AF4) 30%, transparent);
}

/* ==========================================================================
   Global Brand Buttons (var(--ast-global-color-0))
   ========================================================================== */
.order-chat-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ast-global-color-0, var(--oc-primary, #2C6AF4)) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 24px;
    border-radius: 50px !important;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--ast-global-color-0, #2C6AF4) 30%, transparent);
}

.order-chat-btn-primary:hover {
    background: var(--ast-global-color-1, var(--oc-primary-hover, #1a54d6)) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--ast-global-color-0, #2C6AF4) 45%, transparent);
}

.order-chat-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--ast-global-color-0, #2C6AF4) 30%, transparent);
}

.order-chat-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.order-chat-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #e2e8f0;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.order-chat-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   Modal Dialog & Overlay
   ========================================================================== */
.order-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--oc-bg-overlay);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    animation: ocFadeIn 0.3s ease;
}

body.order-chat-modal-open {
    overflow: hidden !important;
}

@keyframes ocFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.order-chat-container {
    width: 80vw;
    max-width: 80vw;
    height: 88vh;
    max-height: 88vh;
    background: #ffffff;
    border: 1px solid var(--oc-border-color);
    border-radius: 24px;
    box-shadow: var(--oc-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: ocSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ocSlideUp {
    from {
        transform: translateY(20px) scale(0.97);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   Modal Header
   ========================================================================== */
.order-chat-header {
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--oc-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-chat-header-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.order-chat-avatar-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--oc-primary-light);
    color: var(--oc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-chat-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--oc-text-dark);
}

.order-chat-modal-title span {
    color: var(--oc-primary);
}

.order-chat-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--oc-text-muted);
}

.order-chat-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.order-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-chat-close-btn {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    color: var(--oc-text-muted);
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
}

.order-chat-close-btn:hover {
    background: #e2e8f0;
    color: var(--oc-text-dark);
}

/* ==========================================================================
   Chat Stream & Message Items (Telegram Light Theme)
   ========================================================================== */
.order-chat-body,
.tg-messages-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #eef2f5;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: auto !important;
}

.order-chat-empty-state {
    margin: auto;
    text-align: center;
    color: var(--oc-text-muted);
}

.order-chat-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--oc-primary-15);
    border-top-color: var(--oc-primary);
    border-radius: 50%;
    animation: ocSpin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes ocSpin {
    to {
        transform: rotate(360deg);
    }
}

.order-chat-date-divider {
    align-self: center;
    background: rgba(0, 0, 0, 0.12);
    color: #ffffff;
    backdrop-filter: blur(4px);
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 12px;
    margin: 10px 0;
}

.order-chat-msg-item {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    width: fit-content;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    animation: ocBubblePop 0.2s ease-out;
}

.order-chat-msg-bubble {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 12px 6px 12px;
    position: relative;
    transition: all 0.2s ease;
    word-wrap: break-word;
}

@keyframes ocBubblePop {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Outgoing Messages (Me / Manager) */
.order-chat-msg-item.me {
    align-self: flex-end;
}

.order-chat-msg-item.me .order-chat-msg-header {
    text-align: right;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--oc-primary);
    padding: 0 4px;
}

.order-chat-msg-item.me .order-chat-msg-bubble {
    background: linear-gradient(135deg, var(--oc-primary) 0%, color-mix(in srgb, var(--oc-primary) 80%, #0ea5e9) 100%);
    color: #ffffff;
    border-radius: 18px 18px 4px 18px;
    padding: 8px 12px 6px 12px;
    box-shadow: 0 3px 10px var(--oc-primary-25);
}

.order-chat-msg-item.me .order-chat-msg-text {
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
    white-space: pre-wrap;
    color: #ffffff;
    padding: 0px 0px;
}

.order-chat-msg-item.me .order-chat-msg-time {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.85);
    text-align: right;
}

/* Incoming Messages (Doctor / Patient) */
.order-chat-msg-item.other {
    align-self: flex-start;
}

.order-chat-msg-item.other .order-chat-msg-header {
    text-align: left;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    padding: 0 4px;
}

.order-chat-msg-item.other .order-chat-msg-bubble {
    background: #ffffff;
    color: var(--oc-text-dark);
    border-radius: 18px 18px 18px 4px;
    padding: 8px 12px 6px 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.order-chat-msg-item.other .order-chat-msg-text {
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
    white-space: pre-wrap;
    color: #0f172a;
    padding: 0px 0px;
}

.order-chat-msg-item.other .order-chat-msg-time {
    font-size: 10.5px;
    color: #94a3b8;
    text-align: right;
}

.order-chat-role-badge {
    display: inline-block;
    background: var(--oc-primary-12);
    color: var(--oc-primary);
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 6px;
    vertical-align: middle;
}

.order-chat-msg-item.me .order-chat-role-badge {
    background: var(--oc-primary-12);
    color: var(--oc-primary);
}

.order-chat-msg-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 2px;
    margin-left: auto;
    align-self: flex-end;
    flex-shrink: 0;
}

.order-chat-msg-time {
    font-size: 10.5px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
}

.order-chat-msg-item.other .order-chat-msg-time {
    color: #94a3b8;
}

.order-chat-ticks {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    display: inline-flex;
    align-items: center;
    transition: color 0.25s ease;
}

.order-chat-ticks.is-read {
    color: #7dd3fc !important;
    /* Bright sky blue for read checkmarks */
}

.order-chat-ticks.is-pending {
    color: rgba(255, 255, 255, 0.75);
    font-size: 10px;
}

.order-chat-ticks.is-pending .fa-spin,
.order-chat-ticks.is-pending .fa-spinner {
    animation: ocSpin 1s linear infinite;
}

.order-chat-ticks.is-error {
    color: #fca5a5 !important;
}

.order-chat-msg-item.is-pending .order-chat-msg-bubble {
    opacity: 0.88;
}

/* Attachment Previews */
.order-chat-img-wrapper {
    margin-top: 4px;
    margin-bottom: 2px;
    border-radius: 12px;
    overflow: hidden;
    max-width: 320px;
    width: 100%;
    background: rgba(0, 0, 0, 0.04);
}

.order-chat-img-preview {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    transition: transform 0.2s ease;
}

.order-chat-img-preview:hover {
    transform: scale(1.02);
}

.order-chat-doc-preview {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.05);
    padding: 10px 14px;
    border-radius: 12px;
    margin-top: 6px;
    font-size: 13px;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    transition: background 0.2s ease;
}

.order-chat-doc-icon {
    font-size: 24px;
    color: var(--oc-primary);
}

.order-chat-doc-info {
    display: flex;
    flex-direction: column;
}

.order-chat-doc-name {
    font-weight: 600;
    font-size: 13px;
}

.order-chat-doc-sub {
    font-size: 11px;
    opacity: 0.75;
    font-weight: 400;
}

.order-chat-msg-item.me .order-chat-doc-preview {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.order-chat-msg-item.me .order-chat-doc-icon {
    color: #ffffff;
}

/* ==========================================================================
   File Preview Bar & Dropzone
   ========================================================================== */
/* Upload Progress Status Bar */
.order-chat-upload-status {
    padding: 8px 16px;
    background: #f0f9ff;
    border-top: 1px solid #bae6fd;
    border-bottom: 1px solid #bae6fd;
}

.order-chat-progress-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 4px;
}

.order-chat-progress-bar {
    width: 100%;
    height: 6px;
    background: #e0f2fe;
    border-radius: 3px;
    overflow: hidden;
}

.order-chat-progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--oc-primary) 0%, color-mix(in srgb, var(--oc-primary) 80%, #0ea5e9) 100%);
    border-radius: 3px;
    transition: width 0.15s ease;
}

/* Multi-File Preview Bar (up to 3 files) */
.order-chat-multi-preview-bar {
    padding: 8px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.order-chat-multi-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-chat-preview-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 6px 10px;
    max-width: 220px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.order-chat-item-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.order-chat-item-icon {
    font-size: 18px;
    color: var(--oc-primary);
    flex-shrink: 0;
}

.order-chat-item-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.2;
}

.order-chat-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-chat-item-size {
    font-size: 10.5px;
    color: #64748b;
}

.order-chat-remove-item-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: auto;
}

.order-chat-remove-item-btn:hover {
    color: #dc2626;
}

.order-chat-dropzone-overlay {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 90px;
    background: var(--oc-primary-90);
    color: #ffffff;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.order-chat-dropzone-box {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

/* ==========================================================================
   Modal Footer / Form Input
   ========================================================================== */
.order-chat-footer {
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid var(--oc-border-color);
}

.order-chat-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 6px 10px 6px 14px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.order-chat-input-row:focus-within {
    border-color: var(--oc-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--oc-primary-12);
}

.order-chat-attach-btn {
    background: transparent;
    border: none;
    color: var(--oc-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.order-chat-attach-btn:hover {
    color: var(--oc-primary);
}

.order-chat-role-select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--oc-text-dark);
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    margin-right: 4px;
}

.order-chat-role-select:hover,
.order-chat-role-select:focus {
    border-color: var(--oc-primary);
    box-shadow: 0 0 0 2px var(--oc-primary-12);
}

.order-chat-input-row textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--oc-text-dark);
    resize: none;
    max-height: 100px;
    padding: 4px 0;
}

.order-chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--oc-primary);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-chat-send-btn:hover {
    background: var(--oc-primary-hover);
    transform: scale(1.05);
}

.order-chat-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 8px;
    text-align: center;
}

/* ==========================================================================
   Lightbox Overlay
   ========================================================================== */
.order-chat-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
    box-sizing: border-box;
}

.order-chat-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    user-select: none;
    transition: transform 0.2s ease;
}

.order-chat-lightbox-toolbar {
    position: absolute;
    top: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000000;
}

.order-chat-lightbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.order-chat-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.order-chat-lightbox-btn:active {
    transform: translateY(0);
}

.order-chat-lightbox-close {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    font-size: 16px;
}

.order-chat-lightbox-download {
    background: var(--oc-primary, #2C6AF4);
    border-color: rgba(255, 255, 255, 0.3);
}

.order-chat-lightbox-download:hover {
    background: var(--oc-primary-hover, #1d4ed8);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Telegram-Style Admin Chat Interface (Light Theme)
   ========================================================================== */
.tg-app-wrapper {
    margin: 20px 20px 20px 0;
    height: calc(100vh - 100px);
    background: #ffffff;
    border: 1px solid var(--oc-border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--oc-text-dark);
}

/* Left Sidebar (Dialogs List) */
.tg-sidebar-pane {
    width: 350px;
    background: #ffffff;
    border-right: 1px solid var(--oc-border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.tg-sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--oc-border-color);
    background: #ffffff;
}

.tg-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.tg-search-box i {
    position: absolute;
    left: 14px;
    color: var(--oc-text-muted);
    font-size: 14px;
}

.tg-search-input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    color: var(--oc-text-dark);
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s ease;
}

.tg-search-input:focus {
    border-color: var(--oc-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--oc-primary-12);
}

.tg-dialogs-stream {
    flex: 1;
    overflow-y: auto;
}

.tg-dialog-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
    border-left: 4px solid transparent;
}

.tg-dialog-card:hover {
    background: #f8fafc;
}

.tg-dialog-card.active {
    background: var(--oc-primary-light);
    border-left-color: var(--oc-primary);
}

.tg-avatar-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--oc-primary-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.tg-dialog-details {
    flex: 1;
    min-width: 0;
}

.tg-dialog-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.tg-dialog-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--oc-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-dialog-card.active .tg-dialog-title {
    color: var(--oc-primary);
}

.tg-dialog-time {
    font-size: 11px;
    color: var(--oc-text-muted);
}

.tg-dialog-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tg-dialog-snippet {
    font-size: 12.5px;
    color: var(--oc-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-unread-badge {
    background: var(--oc-primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.tg-order-status-badge {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #475569;
    white-space: nowrap;
    margin-left: 6px;
    display: inline-block;
}

.tg-search-divider {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.tg-search-empty {
    padding: 30px 20px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tg-search-empty i {
    font-size: 32px;
    color: #cbd5e1;
}

/* Right Main Pane (Chat Room - Light Theme) */
.tg-main-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #eef2f5;
    position: relative;
}

.tg-main-header {
    padding: 14px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--oc-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tg-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tg-header-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--oc-text-dark);
    margin: 0;
}

.tg-header-title span {
    color: var(--oc-primary);
}

.tg-header-sub {
    font-size: 12.5px;
    color: var(--oc-text-muted);
}

.tg-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tg-action-btn {
    background: #f1f5f9;
    color: var(--oc-text-dark);
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.tg-action-btn:hover {
    background: var(--oc-primary);
    color: #ffffff;
    border-color: var(--oc-primary);
}

.tg-empty-select {
    margin: auto;
    text-align: center;
    color: var(--oc-text-muted);
}

.tg-empty-select i {
    font-size: 54px;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.tg-input-bar {
    padding: 12px 20px;
    background: #ffffff;
    border-top: 1px solid var(--oc-border-color);
}

.tg-input-top-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 2px;
}

.tg-role-pill-wrap,
button.order-chat-templates-btn,
.tg-top-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 32px !important;
    min-height: 32px !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 0 12px !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    outline: none !important;
}

.tg-role-pill-wrap:hover,
button.order-chat-templates-btn:hover,
.tg-top-action-btn:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

.tg-role-pill-wrap i {
    font-size: 12.5px !important;
    color: var(--ast-global-color-0, #3182ce) !important;
    flex-shrink: 0;
}

/* Custom Dropdown Trigger & Floating Menu */
.tg-role-pill-wrap.order-chat-custom-dropdown,
.tg-role-pill-wrap.tg-role-pill-static {
    position: relative !important;
    padding: 0 !important;
}

.tg-role-pill-static {
    cursor: default !important;
    user-select: none !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

.tg-role-pill-static .tg-role-pill-trigger {
    cursor: default !important;
    pointer-events: none !important;
}

.tg-role-pill-trigger {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    height: 100% !important;
    padding: 0 12px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-family: 'Montserrat', -apple-system, sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    cursor: pointer !important;
    outline: none !important;
    line-height: 1 !important;
}

.tg-role-pill-wrap.is-open {
    background: #e2e8f0 !important;
    border-color: var(--ast-global-color-0, #3182ce) !important;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.2) !important;
}

.tg-role-chevron {
    font-size: 10px !important;
    color: #94a3b8 !important;
    transition: transform 0.2s ease !important;
    margin-left: 2px !important;
}

.tg-role-pill-wrap.is-open .tg-role-chevron {
    transform: rotate(180deg) !important;
    color: var(--ast-global-color-0, #3182ce) !important;
}

.tg-custom-dropdown-menu {
    position: absolute !important;
    bottom: calc(100% + 8px) !important;
    left: 0 !important;
    min-width: 175px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    padding: 6px !important;
    z-index: 1000 !important;
    animation: tgDropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

@keyframes tgDropdownPop {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tg-dropdown-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 7px 10px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    gap: 10px !important;
    user-select: none !important;
}

.tg-dropdown-item:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.tg-dropdown-item.is-selected {
    background: rgba(49, 130, 206, 0.08) !important;
    color: var(--ast-global-color-0, #3182ce) !important;
}

.tg-dropdown-item-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.tg-dropdown-icon-box {
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
}

.tg-dropdown-check {
    font-size: 11px !important;
    color: var(--ast-global-color-0, #3182ce) !important;
    display: none !important;
}

.tg-dropdown-item.is-selected .tg-dropdown-check {
    display: block !important;
}

button.order-chat-templates-btn i,
.tg-top-action-btn i {
    font-size: 12.5px !important;
    color: #f59e0b !important;
    flex-shrink: 0;
}

button.order-chat-templates-btn span,
.tg-top-action-btn span {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    line-height: 1 !important;
}

/* Скрытие кнопки голосовых сообщений в админке Telegram Web */
.tg-app-wrapper .order-chat-voice-btn,
.tg-app-wrapper .tg-voice-btn {
    display: none !important;
}

.tg-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 6px 10px 6px 16px;
    transition: all 0.2s ease;
}

.tg-input-container:focus-within {
    border-color: var(--oc-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--oc-primary-12);
}

.tg-attach-btn {
    background: transparent;
    border: none;
    color: var(--oc-text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tg-attach-btn:hover {
    color: var(--oc-primary);
}

.tg-text-field,
#order-chat-text-input,
textarea#order-chat-text-input,
.tg-input-container textarea,
.order-chat-input-row textarea {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    border-color: transparent !important;
    outline: none !important;
    outline-style: none !important;
    outline-width: 0 !important;
    outline-color: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    color: var(--oc-text-dark) !important;
    font-size: 14px !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    resize: none !important;
    max-height: 100px !important;
    padding: 6px 4px !important;
    line-height: 1.4 !important;
}

.tg-text-field:focus,
.tg-text-field:focus-visible,
.tg-text-field:active,
#order-chat-text-input:focus,
#order-chat-text-input:focus-visible,
#order-chat-text-input:active,
textarea#order-chat-text-input:focus,
textarea#order-chat-text-input:focus-visible,
textarea#order-chat-text-input:active,
.tg-input-container textarea:focus,
.tg-input-container textarea:focus-visible,
.order-chat-input-row textarea:focus,
.order-chat-input-row textarea:focus-visible {
    outline: none !important;
    outline-style: none !important;
    outline-width: 0 !important;
    outline-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: transparent !important;
}

.tg-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--oc-primary);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tg-send-btn:hover {
    transform: scale(1.05);
    background: var(--oc-primary-hover);
}

/* ==========================================================================
   Mobile & Responsive Adaptation
   ========================================================================== */
/* ==========================================================================
   Mobile & Responsive Adaptation for WordPress Admin Telegram Web
   ========================================================================== */
.tg-mobile-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f1f5f9;
    color: var(--oc-text-dark);
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.tg-mobile-back-btn:hover {
    background: var(--oc-primary);
    color: #ffffff;
    border-color: var(--oc-primary);
}

/* WP Admin page height fix on desktop */
.wrap .tg-app-wrapper {
    height: calc(100vh - 140px);
    max-height: calc(100vh - 140px);
    min-height: 450px;
}

@media screen and (max-width: 782px) {
    /* Сброс отступов админки WordPress для полноэкранного вида чата */
    body.toplevel_page_order-chat #wpcontent,
    body.admin_page_order-chat #wpcontent,
    body[class*="page_order-chat"] #wpcontent {
        padding: 0 !important;
        margin: 0 !important;
    }

    body.toplevel_page_order-chat #wpbody-content,
    body.admin_page_order-chat #wpbody-content,
    body[class*="page_order-chat"] #wpbody-content {
        padding-bottom: 0 !important;
        float: none !important;
    }

    body.toplevel_page_order-chat .wrap,
    body.admin_page_order-chat .wrap,
    body[class*="page_order-chat"] .wrap {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Скрытие стандартных заголовков WordPress на мобильных */
    .wrap > h1,
    .wrap > .wp-heading-inline,
    .wrap > .wp-header-end,
    .wrap > hr,
    #wpfooter {
        display: none !important;
    }

    /* Модальное окно чата на мобильных (в личном кабинете) */
    .order-chat-overlay {
        padding: 0 !important;
    }

    .order-chat-container {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
    }

    .order-chat-header {
        padding: 10px 14px;
    }

    .order-chat-avatar-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 14px;
    }

    .order-chat-modal-title {
        font-size: 14px;
    }

    .order-chat-close-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 15px;
    }

    .order-chat-trigger-card {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }

    .order-chat-open-btn {
        width: 100%;
        justify-content: center;
    }

    .wrap .tg-app-wrapper,
    .tg-app-wrapper {
        margin: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        position: relative !important;
        overflow: hidden !important;
    }

    /* Плавное переключение между списком диалогов и активным чатом */
    .tg-sidebar-pane,
    .tg-main-pane {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease !important;
    }

    .tg-app-wrapper:not(.mobile-chat-active) .tg-sidebar-pane {
        transform: translateX(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 10 !important;
        display: flex !important;
    }

    .tg-app-wrapper:not(.mobile-chat-active) .tg-main-pane {
        transform: translateX(100%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        z-index: 5 !important;
    }

    .tg-app-wrapper.mobile-chat-active .tg-sidebar-pane {
        transform: translateX(-25%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        z-index: 5 !important;
    }

    .tg-app-wrapper.mobile-chat-active .tg-main-pane {
        transform: translateX(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 10 !important;
        display: flex !important;
    }

    /* Шапка активного диалога */
    .tg-main-header {
        padding: 8px 12px;
        min-height: 52px;
        height: 52px;
        gap: 8px;
        background: #ffffff;
        border-bottom: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .tg-mobile-back-btn {
        display: inline-flex !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 50% !important;
        background: #f1f5f9 !important;
        border: 1px solid #e2e8f0 !important;
        color: #0f172a !important;
        padding: 0 !important;
        margin-right: 4px !important;
        font-size: 15px !important;
        justify-content: center !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }

    .tg-mobile-back-btn:active {
        background: var(--oc-primary) !important;
        color: #ffffff !important;
    }

    .tg-mobile-back-btn span,
    .tg-mobile-back-text {
        display: none !important;
    }

    .tg-header-info {
        gap: 6px;
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
    }

    .tg-header-info > i {
        display: none !important;
    }

    .tg-header-titles {
        display: flex;
        flex-direction: column;
        min-width: 0;
        max-width: 150px;
    }

    .tg-header-title {
        font-size: 13.5px;
        font-weight: 700;
        color: #0f172a;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }

    .tg-header-sub {
        font-size: 11px;
        color: #64748b;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }

    .tg-header-actions {
        gap: 6px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

    .order-chat-call-trigger-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        font-size: 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: var(--ast-global-color-0, #3182ce) !important;
        color: #ffffff !important;
        border: none !important;
        flex-shrink: 0 !important;
    }

    .order-chat-call-trigger-btn span,
    .order-chat-call-trigger-btn font {
        display: none !important;
    }

    .tg-action-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        background: #f1f5f9 !important;
        border: 1px solid #e2e8f0 !important;
        color: #475569 !important;
        font-size: 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }

    .tg-action-btn span,
    .tg-action-btn font,
    .tg-btn-label {
        display: none !important;
    }

    /* Список диалогов */
    .tg-sidebar-header {
        padding: 10px 12px;
    }

    .tg-search-input {
        font-size: 13px;
        padding: 8px 12px 8px 36px;
    }

    .tg-dialog-card {
        padding: 12px 14px;
        gap: 10px;
    }

    .tg-avatar-circle {
        width: 44px;
        height: 44px;
        font-size: 15px;
    }

    .tg-dialog-title {
        font-size: 13.5px;
    }

    .tg-dialog-snippet {
        font-size: 12px;
    }

    /* Верхняя микро-панель выбора роли и шаблонов на мобильном */
    .tg-input-top-bar {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin-bottom: 6px !important;
        padding: 0 2px !important;
    }

    .tg-role-pill-wrap,
    button.order-chat-templates-btn,
    .tg-top-action-btn {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        height: 30px !important;
        min-height: 30px !important;
        background: #f1f5f9 !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 15px !important;
        padding: 0 10px !important;
        font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #334155 !important;
        line-height: 1 !important;
        cursor: pointer !important;
        text-decoration: none !important;
        box-shadow: none !important;
        transition: all 0.2s ease !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        outline: none !important;
    }

    .tg-role-pill-wrap:active,
    button.order-chat-templates-btn:active,
    .tg-top-action-btn:active {
        background: #e2e8f0 !important;
        color: #0f172a !important;
    }

    .tg-role-pill-wrap i {
        font-size: 12px !important;
        color: var(--ast-global-color-0, #3182ce) !important;
        flex-shrink: 0 !important;
    }

    .tg-role-pill-wrap .order-chat-role-select {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        font-family: inherit !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #1e293b !important;
        padding: 0 !important;
        margin: 0 !important;
        outline: none !important;
        cursor: pointer !important;
        max-width: 90px !important;
        line-height: 1 !important;
    }

    button.order-chat-templates-btn i,
    .tg-top-action-btn i {
        font-size: 12px !important;
        color: #f59e0b !important;
        flex-shrink: 0 !important;
    }

    button.order-chat-templates-btn span,
    .tg-top-action-btn span {
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #334155 !important;
        line-height: 1 !important;
    }

    /* Поле ввода сообщения (Полноразмерный инпут в стиле Telegram) */
    .tg-input-bar {
        padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)) 10px;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
    }

    .tg-input-container {
        display: flex !important;
        align-items: center;
        gap: 6px;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
        border-radius: 24px;
        padding: 4px 6px 4px 8px;
        transition: all 0.2s ease;
    }

    .tg-input-container:focus-within {
        background: #ffffff;
        border-color: var(--ast-global-color-0, #3182ce);
        box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.12);
    }

    .tg-attach-btn,
    .order-chat-emoji-btn,
    .tg-voice-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        border: none !important;
        background: transparent !important;
        color: #64748b !important;
        font-size: 17px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
    }

    .tg-attach-btn:active,
    .order-chat-emoji-btn:active,
    .tg-voice-btn:active {
        color: var(--ast-global-color-0, #3182ce) !important;
        background: rgba(49, 130, 206, 0.08) !important;
    }

    .tg-text-field,
    #order-chat-text-input,
    textarea#order-chat-text-input {
        flex: 1 1 auto !important;
        min-width: 40px !important;
        font-size: 14px !important;
        padding: 6px 4px !important;
        min-height: 22px !important;
        max-height: 80px !important;
        line-height: 1.4 !important;
        border: none !important;
        border-color: transparent !important;
        outline: none !important;
        outline-style: none !important;
        outline-width: 0 !important;
        outline-color: transparent !important;
        box-shadow: none !important;
        -webkit-box-shadow: none !important;
        -webkit-tap-highlight-color: transparent !important;
        background: transparent !important;
        color: #0f172a !important;
    }

    .tg-text-field:focus,
    .tg-text-field:focus-visible,
    #order-chat-text-input:focus,
    #order-chat-text-input:focus-visible {
        outline: none !important;
        outline-style: none !important;
        outline-width: 0 !important;
        outline-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        -webkit-box-shadow: none !important;
    }

    .tg-send-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        border-radius: 50% !important;
        background: var(--ast-global-color-0, #3182ce) !important;
        color: #ffffff !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 14px !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
    }

    .tg-send-btn i {
        font-size: 14px;
    }

    /* Мобильный голосовой рекордер */
    .order-chat-voice-panel {
        gap: 6px;
        padding: 0 4px;
    }

    .order-chat-voice-timer {
        font-size: 12px;
        min-width: 36px;
    }

    .order-chat-voice-equalizer {
        gap: 2px;
        height: 18px;
    }

    .order-chat-eq-bar {
        width: 2.5px;
    }

    .order-chat-voice-cancel-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .order-chat-voice-send-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    /* Сообщения */
    .order-chat-msg-item {
        max-width: 88%;
    }

    .order-chat-msg-bubble {
        padding: 8px 12px;
        font-size: 13.5px;
        border-radius: 16px;
    }

    /* Модальное окно Green Room (Lobby) на мобильном */
    .order-chat-lobby-card {
        width: calc(100vw - 20px);
        max-width: 100vw;
        max-height: 92dvh;
        border-radius: 20px;
        overflow-y: auto;
    }

    .order-chat-lobby-body {
        flex-direction: column;
        padding: 14px;
        gap: 14px;
    }

    .order-chat-lobby-preview-wrapper {
        min-height: 180px;
        height: 180px;
    }

    .order-chat-lobby-info h3 {
        font-size: 16px;
    }

    .order-chat-lobby-actions button {
        height: 44px !important;
        font-size: 14px !important;
    }

    /* Групповой звонок на мобильном */
    .order-chat-video-grid.grid-2 {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .order-chat-video-grid.grid-3 {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr 1fr;
    }

    .order-chat-video-grid.grid-3 .order-chat-peer-tile:first-child {
        grid-column: span 1;
        max-width: 100%;
    }

    .order-chat-video-grid.grid-4 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .order-chat-video-grid.grid-5 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr 1fr;
    }

    .order-chat-video-grid.grid-5 .order-chat-peer-tile:nth-child(1),
    .order-chat-video-grid.grid-5 .order-chat-peer-tile:nth-child(2) {
        grid-column: span 1;
    }

    .order-chat-video-grid.grid-5 .order-chat-peer-tile:nth-child(5) {
        grid-column: span 2;
    }

    .order-chat-peer-tile {
        min-height: 130px;
    }
}

@media (max-width: 420px) {
    .order-chat-call-trigger-btn span {
        display: none;
    }

    .order-chat-call-trigger-btn {
        padding: 0;
        border-radius: 50%;
        width: 34px;
        height: 34px;
        min-width: 34px;
        justify-content: center;
    }

    .tg-header-title,
    .tg-header-sub {
        max-width: 120px;
    }
}

/* WP Admin Bar Height on Fullscreen & Admin chat page */
body.admin-bar #order-chat-fullscreen-page {
    height: calc(100vh - 32px) !important;
}

/* Скрытие админ-бара ТОЛЬКО на мобильных устройствах и ТОЛЬКО на странице чата */
@media screen and (max-width: 782px) {
    body:has(#order-chat-fullscreen-page) #wpadminbar,
    body:has(.tg-app-wrapper) #wpadminbar,
    #order-chat-fullscreen-page ~ #wpadminbar {
        display: none !important;
    }

    html:has(#order-chat-fullscreen-page),
    body.admin-bar:has(#order-chat-fullscreen-page),
    html.wp-toolbar:has(#order-chat-fullscreen-page),
    html:has(.tg-app-wrapper),
    body.admin-bar:has(.tg-app-wrapper),
    html.wp-toolbar:has(.tg-app-wrapper) {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.admin-bar #order-chat-fullscreen-page {
        height: 100dvh !important;
        max-height: 100dvh !important;
    }
}

.order-chat-container select,
.tg-app-wrapper select,
.order-chat-overlay select,
.order-chat-modal select,
select.order-chat-select,
select.order-chat-device-select,
select.order-chat-select-sm,
select.order-chat-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: calc(100% - 12px) center !important;
    background-size: 11px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 8px 34px 8px 14px !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    outline: none !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}

.order-chat-container select:hover,
.tg-app-wrapper select:hover,
.order-chat-overlay select:hover,
select.order-chat-device-select:hover,
select.order-chat-select-sm:hover,
select.order-chat-input:hover {
    border-color: var(--ast-global-color-0, #3182ce) !important;
    background-color: #f8fafc !important;
}

.order-chat-container select:focus,
.tg-app-wrapper select:focus,
.order-chat-overlay select:focus,
select.order-chat-device-select:focus,
select.order-chat-select-sm:focus,
select.order-chat-input:focus {
    border-color: var(--ast-global-color-0, #3182ce) !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15) !important;
}

/* Specific: Role Select inside pill wrap */
.tg-role-pill-wrap select.order-chat-role-select,
.order-chat-role-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 2px center !important;
    background-size: 9px !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 16px 0 0 !important;
    font-family: inherit !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    outline: none !important;
    cursor: pointer !important;
    height: auto !important;
    line-height: 1 !important;
    transition: color 0.15s ease !important;
}

.tg-role-pill-wrap:hover select.order-chat-role-select {
    color: #0f172a !important;
}

/* Specific: Device Selects in Lobby Modal */
select.order-chat-device-select {
    width: 100% !important;
    height: 40px !important;
    padding: 0 34px 0 14px !important;
    font-size: 13px !important;
    border-radius: 12px !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

/* Specific: Small Select in Drawing Editor Toolbar */
select.order-chat-select-sm {
    height: 32px !important;
    padding: 0 26px 0 10px !important;
    font-size: 12px !important;
    border-radius: 16px !important;
    background-position: calc(100% - 8px) center !important;
    background-size: 9px !important;
}

/* Options inside dropdown */
.order-chat-container select option,
.tg-app-wrapper select option,
.order-chat-overlay select option,
select.order-chat-role-select option,
select.order-chat-device-select option {
    background: #ffffff !important;
    color: #1e293b !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 8px 12px !important;
}

/* ==========================================================================
   Virtual Setup Banner & Iframe (on-hold orders)
   ========================================================================== */
.order-chat-setup-banner {
    background: #ffffff;
    border-bottom: 1px solid var(--oc-border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    z-index: 10;
    flex-shrink: 0;
    font-family: 'Montserrat', sans-serif;
}

.order-chat-setup-header {
    padding: 10px 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
}

.order-chat-setup-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-chat-setup-icon {
    font-size: 20px;
    color: var(--oc-primary);
    background: var(--oc-primary-10);
    padding: 8px;
    border-radius: 10px;
}

.order-chat-setup-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--oc-text-dark);
}

.order-chat-setup-subtitle {
    font-size: 11.5px;
    color: var(--oc-text-muted);
}

.order-chat-setup-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-chat-setup-btn-icon {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.order-chat-setup-btn-icon:hover {
    background: var(--oc-primary);
    color: #ffffff;
    border-color: var(--oc-primary);
}

.order-chat-setup-content {
    background: #f1f5f9;
}

.order-chat-iframe-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 48vh;
    min-height: 260px;
    background: #0f172a;
    position: relative;
}

.order-chat-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.order-chat-setup-actions-bar {
    padding: 12px 18px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.order-chat-btn-approve,
.order-chat-btn-reject {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Montserrat', sans-serif;
}

.order-chat-btn-approve {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.order-chat-btn-approve:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
}

.order-chat-btn-reject {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.order-chat-btn-reject:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.order-chat-status-msg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.order-chat-status-msg.approved {
    background: #dcfce7;
    color: #15803d;
}

.order-chat-status-msg.rejected {
    background: #fee2e2;
    color: #b91c1c;
}

/* Submodal Rejection Prompt, Device Settings & Call Choice */
.order-chat-submodal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

.order-chat-submodal-overlay:not([style*="display: none"]),
.order-chat-submodal-overlay[style*="display: block"],
.order-chat-submodal-overlay[style*="display: flex"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.order-chat-submodal-card,
.order-chat-choice-card,
.order-chat-settings-card,
.order-chat-lobby-card,
.order-chat-call-card {
    position: relative;
    margin: auto !important;
}

.order-chat-submodal-card {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    animation: ocSlideUp 0.25s ease;
}

.order-chat-submodal-header {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-chat-submodal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.order-chat-submodal-close {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    font-size: 18px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
    padding: 0 !important;
}

.order-chat-submodal-close:hover {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border-color: #fecaca !important;
    transform: scale(1.08) !important;
}

.order-chat-submodal-body {
    padding: 20px;
}

.order-chat-submodal-body p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
}

.order-chat-submodal-body textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px;
    font-size: 13.5px;
    font-family: inherit;
    resize: vertical;
    outline: none;
}

.order-chat-submodal-body textarea:focus {
    border-color: var(--oc-primary);
    box-shadow: 0 0 0 3px var(--oc-primary-15);
}

.order-chat-submodal-footer {
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.order-chat-submodal-cancel-btn {
    background: #e2e8f0;
    color: #475569;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.order-chat-submodal-submit-btn {
    background: #dc2626;
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.order-chat-submodal-submit-btn:hover {
    background: #b91c1c;
}

@media (max-width: 768px) {
    .order-chat-iframe-container {
        height: 250px;
    }

    .order-chat-btn-approve,
    .order-chat-btn-reject {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Image Drawing Editor Submodal & Tools
   ========================================================================== */
.order-chat-edit-img-btn {
    background: #e0f2fe;
    color: var(--oc-primary);
    border: 1px solid #bae6fd;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.order-chat-edit-img-btn:hover {
    background: var(--oc-primary);
    border: 2px solid var(--oc-primary);
    border-color: var(--oc-primary);
}

.order-chat-editor-card {
    background: #ffffff;
    border-radius: 20px;
    width: 92vw;
    max-width: 850px;
    max-height: 90vh;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: ocSlideUp 0.25s ease;
}

.order-chat-editor-header {
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-chat-editor-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-chat-editor-toolbar {
    padding: 10px 18px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.order-chat-editor-tool-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
}

.order-chat-color-palette {
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-chat-color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.order-chat-color-swatch:hover {
    transform: scale(1.15);
}

.order-chat-color-swatch.active {
    transform: scale(1.2);
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--oc-primary);
}

#order-chat-custom-color {
    width: 26px;
    height: 26px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
}

.order-chat-select-sm {
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 12px;
    outline: none;
}

.order-chat-btn-sm {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-chat-btn-sm:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.order-chat-editor-canvas-container {
    flex: 1;
    min-height: 280px;
    max-height: 55vh;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 15px;
    box-sizing: border-box;
}

#order-chat-editor-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: crosshair;
    touch-action: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.order-chat-editor-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.order-chat-editor-save-btn {
    background: var(--oc-primary-gradient);
    color: #ffffff;
    border: none;
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--oc-primary-25);
    transition: all 0.2s ease;
}

.order-chat-editor-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--oc-primary-35);
}

/* ==========================================================================
   Voice Messages & MediaRecorder UI
   ========================================================================== */
.order-chat-voice-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.order-chat-voice-btn:hover {
    background: var(--oc-primary-10);
    color: var(--oc-primary);
}

.order-chat-voice-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 20px;
    padding: 6px 16px;
    box-sizing: border-box;
}

.order-chat-voice-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-chat-voice-dot {
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    animation: ocPulse 1.2s infinite;
}

@keyframes ocPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.order-chat-voice-timer {
    font-weight: 700;
    font-size: 14px;
    color: #991b1b;
    font-family: monospace;
}

.order-chat-voice-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-chat-voice-cancel-btn {
    background: transparent;
    border: none;
    color: #b91c1c;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.order-chat-voice-cancel-btn:hover {
    background: rgba(220, 38, 38, 0.15);
}

.order-chat-voice-send-btn {
    background: #dc2626;
    color: #ffffff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    transition: transform 0.2s ease;
}

.order-chat-voice-send-btn:hover {
    transform: scale(1.08);
}

/* Audio Soundwave Equalizer Animation */
.order-chat-soundwave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 16px;
    margin-left: 6px;
}

.order-chat-soundwave span {
    display: inline-block;
    width: 3px;
    height: 100%;
    background: #dc2626;
    border-radius: 3px;
    animation: ocSoundwave 0.8s ease-in-out infinite alternate;
}

.order-chat-soundwave span:nth-child(1) {
    animation-delay: 0.1s;
}

.order-chat-soundwave span:nth-child(2) {
    animation-delay: 0.35s;
}

.order-chat-soundwave span:nth-child(3) {
    animation-delay: 0.2s;
}

.order-chat-soundwave span:nth-child(4) {
    animation-delay: 0.45s;
}

.order-chat-soundwave span:nth-child(5) {
    animation-delay: 0.15s;
}

@keyframes ocSoundwave {
    0% {
        height: 4px;
        opacity: 0.3;
    }

    100% {
        height: 16px;
        opacity: 1;
    }
}

/* ============================================================
   Custom Voice Audio Player вЂ” Modern Waveform Design
   ============================================================ */
/* Audio Message Bubble Container */
.order-chat-msg-bubble.has-audio,
.order-chat-msg-bubble:has(.order-chat-custom-audio-player) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    align-items: flex-end !important;
    gap: 8px !important;
}

.order-chat-msg-bubble.has-audio .order-chat-msg-meta,
.order-chat-msg-bubble:has(.order-chat-custom-audio-player) .order-chat-msg-meta {
    align-self: flex-end !important;
    margin-bottom: 3px !important;
}

.order-chat-msg-bubble.has-audio .order-chat-msg-time,
.order-chat-msg-bubble:has(.order-chat-custom-audio-player) .order-chat-msg-time {
    color: #64748b !important;
}

.order-chat-msg-bubble.has-audio .order-chat-ticks:not(.is-read),
.order-chat-msg-bubble:has(.order-chat-custom-audio-player) .order-chat-ticks:not(.is-read) {
    color: #64748b !important;
}

.order-chat-custom-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 260px;
    max-width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px 18px 18px 4px;
    box-sizing: border-box;
    margin-top: 0;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.order-chat-custom-audio-player.is-playing {
    box-shadow: 0 4px 20px color-mix(in srgb, var(--oc-primary) 18%, transparent);
}

.order-chat-msg-item.me .order-chat-custom-audio-player {
    background: linear-gradient(135deg, var(--oc-primary) 0%, color-mix(in srgb, var(--oc-primary) 80%, #0ea5e9) 100%) !important;
    color: #ffffff;
    border-radius: 18px 18px 4px 18px !important;
    border: none !important;
    box-shadow: 0 3px 10px var(--oc-primary-25) !important;
}

/* Play/Pause button */
.order-chat-audio-play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--oc-primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 3px 10px var(--oc-primary-35);
    padding: 0;
}

.order-chat-audio-play-btn:hover {
    transform: scale(1.10);
    box-shadow: 0 5px 16px var(--oc-primary-45);
}

.order-chat-audio-play-btn:active {
    transform: scale(0.95);
}

.order-chat-msg-item.me .order-chat-audio-play-btn {
    background: rgba(255, 255, 255, 0.92);
    color: var(--oc-primary);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Audio body */
.order-chat-audio-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

/* Telegram-Style Interactive Audio Progress Bar */
.order-chat-audio-progress-bar {
    width: 100%;
    height: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 4px 0;
    box-sizing: border-box;
    touch-action: none;
    user-select: none;
}

.order-chat-audio-track {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    position: relative;
    overflow: visible;
}

.order-chat-msg-item.me .order-chat-audio-track {
    background: rgba(255, 255, 255, 0.35);
}

.order-chat-audio-fill {
    height: 100%;
    width: 0%;
    background: var(--oc-primary);
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.05s linear;
}

.order-chat-msg-item.me .order-chat-audio-fill {
    background: #ffffff;
}

.order-chat-audio-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--oc-primary);
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%) scale(0.9);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
    transition: left 0.05s linear, transform 0.1s ease;
}

.order-chat-msg-item.me .order-chat-audio-thumb {
    background: #ffffff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.order-chat-audio-progress-bar:hover .order-chat-audio-thumb,
.order-chat-audio-progress-bar.is-dragging .order-chat-audio-thumb {
    transform: translate(-50%, -50%) scale(1.3);
}

.order-chat-audio-progress-bar.is-dragging .order-chat-audio-fill,
.order-chat-audio-progress-bar.is-dragging .order-chat-audio-thumb {
    transition: none !important;
}

/* Time row */
.order-chat-audio-time-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #64748b;
}

.order-chat-msg-item.me .order-chat-audio-time-meta {
    color: rgba(255, 255, 255, 0.8);
}

/* Speech Transcript Preview & Toggle Box */
.order-chat-voice-transcript-preview {
    font-size: 11.5px;
    color: #7f1d1d;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
    opacity: 0.85;
}

.order-chat-transcript-toggle-btn {
    background: transparent;
    border: none;
    color: var(--oc-primary);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.2s ease;
}

.order-chat-msg-item.me .order-chat-transcript-toggle-btn {
    color: #e0f2fe;
}

.order-chat-transcript-toggle-btn:hover {
    opacity: 0.8;
}

.order-chat-transcript-box {
    background: var(--oc-primary-08);
    border-left: 3px solid var(--oc-primary);
    border-radius: 0 10px 10px 0;
    padding: 8px 12px;
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.4;
    color: #1e293b;
    display: none;
    align-items: flex-start;
    gap: 8px;
}

.order-chat-transcript-box.active {
    display: flex !important;
}

.order-chat-msg-item.me .order-chat-transcript-box {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: #ffffff;
    color: #ffffff;
}

.order-chat-transcript-box i {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 2px;
}

/* ==========================================================================
   Floating Action Button (Fixed to bottom-right corner)
   ========================================================================== */
.order-chat-floating-trigger {
    position: fixed !important;
    bottom: 28px !important;
    right: 28px !important;
    z-index: 999990 !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: var(--oc-primary) !important;
    color: #ffffff !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.order-chat-floating-trigger:hover {
    transform: translateY(-3px) scale(1.08) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35) !important;
    filter: brightness(1.08) !important;
}

.order-chat-floating-trigger i {
    font-size: 24px !important;
}

.order-chat-floating-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* ==========================================================================
   Emoji Picker Panel (Modern Telegram/Apple Style)
   ========================================================================== */
.order-chat-emoji-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 18px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.order-chat-emoji-btn:hover {
    color: var(--oc-primary);
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.order-chat-emoji-picker-panel {
    position: absolute;
    width: 320px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: ocEmojiSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ocEmojiSlide {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.order-chat-emoji-header {
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-chat-emoji-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 10px;
}

.order-chat-emoji-tab {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 16px;
    padding: 5px 0;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.65;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.order-chat-emoji-tab:hover {
    opacity: 1;
}

.order-chat-emoji-tab.active {
    opacity: 1;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.order-chat-emoji-search {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 12.5px;
    outline: none;
    box-sizing: border-box;
    background: #ffffff;
    transition: all 0.15s ease;
}

.order-chat-emoji-search:focus {
    border-color: var(--oc-primary);
    box-shadow: 0 0 0 2px var(--oc-primary-15);
}

.order-chat-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    padding: 10px 12px;
    max-height: 210px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.order-chat-emoji-grid::-webkit-scrollbar {
    width: 5px;
}

.order-chat-emoji-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.order-chat-emoji-item {
    font-size: 22px;
    line-height: 1;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.12s ease, background 0.12s ease;
}

.order-chat-emoji-item:hover {
    transform: scale(1.25);
    background: var(--oc-primary-15);
}

/* ==========================================================================
   Big Emojis in Messages (Telegram Style)
   ========================================================================== */
.order-chat-msg-bubble.is-single-emoji,
.order-chat-msg-bubble.is-double-emoji,
.order-chat-msg-bubble.is-triple-emoji {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 4px !important;
}

.order-chat-msg-bubble.is-single-emoji .order-chat-msg-text {
    font-size: 58px !important;
    line-height: 1.15 !important;
    display: inline-block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.14));
    animation: ocEmojiPop 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: text;
}

.order-chat-msg-bubble.is-double-emoji .order-chat-msg-text {
    font-size: 44px !important;
    line-height: 1.15 !important;
    display: inline-block;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.1));
}

.order-chat-msg-bubble.is-triple-emoji .order-chat-msg-text {
    font-size: 34px !important;
    line-height: 1.15 !important;
    display: inline-block;
}

@keyframes ocEmojiPop {
    0% { transform: scale(0.5); opacity: 0; }
    75% { transform: scale(1.18); }
    100% { transform: scale(1); opacity: 1; }
}

.order-chat-msg-bubble.is-single-emoji .order-chat-msg-meta,
.order-chat-msg-bubble.is-double-emoji .order-chat-msg-meta,
.order-chat-msg-bubble.is-triple-emoji .order-chat-msg-meta {
    background: rgba(15, 23, 42, 0.45);
    padding: 2px 7px;
    border-radius: 12px;
    color: #ffffff !important;
    font-size: 10px;
    backdrop-filter: blur(4px);
    margin-top: -6px;
    align-self: flex-end;
}

.order-chat-msg-bubble.is-single-emoji .order-chat-msg-meta .order-chat-msg-time,
.order-chat-msg-bubble.is-double-emoji .order-chat-msg-meta .order-chat-msg-time,
.order-chat-msg-bubble.is-triple-emoji .order-chat-msg-meta .order-chat-msg-time {
    color: #ffffff !important;
}

.order-chat-msg-bubble.is-single-emoji .order-chat-ticks,
.order-chat-msg-bubble.is-double-emoji .order-chat-ticks,
.order-chat-msg-bubble.is-triple-emoji .order-chat-ticks {
    color: #ffffff !important;
}

/* ==========================================================================
   Reply / Quote Feature
   ========================================================================== */
.order-chat-msg-item {
    position: relative;
}

.order-chat-msg-bubble-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.order-chat-msg-item.me .order-chat-msg-bubble-wrapper {
    flex-direction: row-reverse;
}

.order-chat-msg-reply-btn {
    opacity: 0;
    visibility: hidden;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.08);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.order-chat-msg-item:hover .order-chat-msg-reply-btn {
    opacity: 1;
    visibility: visible;
}

.order-chat-msg-reply-btn:hover {
    background: var(--oc-primary);
    color: #ffffff;
    transform: scale(1.1);
}

/* Quoted block inside bubble */
.order-chat-quote-bubble {
    background: rgba(0, 0, 0, 0.05);
    border-left: 3px solid var(--oc-primary);
    border-radius: 6px;
    padding: 5px 9px;
    margin-bottom: 6px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, transform 0.1s ease;
    max-width: 100%;
    box-sizing: border-box;
}

.order-chat-msg-item.me .order-chat-quote-bubble {
    background: rgba(255, 255, 255, 0.18);
    border-left-color: #ffffff;
    color: #ffffff;
}

.order-chat-quote-bubble:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.order-chat-msg-item.me .order-chat-quote-bubble:hover {
    background: rgba(255, 255, 255, 0.28);
}

.order-chat-quote-user {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--oc-primary);
    margin-bottom: 1px;
}

.order-chat-msg-item.me .order-chat-quote-user {
    color: #ffffff;
}

.order-chat-quote-text {
    display: block;
    font-size: 12.5px;
    line-height: 1.3;
    opacity: 0.88;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

/* Flash animation when jumping to message */
.order-chat-msg-item.is-target-highlight .order-chat-msg-bubble {
    animation: ocTargetHighlight 1.5s ease-out;
}

@keyframes ocTargetHighlight {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.04);
        filter: brightness(1.2);
        box-shadow: 0 0 16px var(--oc-primary);
    }

    50% {
        transform: scale(1.02);
    }
}

/* Reply bar above input */
.order-chat-reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-left: 3px solid var(--oc-primary);
    border-radius: 8px 8px 0 0;
    padding: 6px 12px;
    margin-bottom: 4px;
    animation: ocSlideDown 0.15s ease-out;
}

@keyframes ocSlideDown {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-chat-reply-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.order-chat-reply-icon {
    font-size: 14px;
    color: var(--oc-primary);
    flex-shrink: 0;
}

.order-chat-reply-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.order-chat-reply-user {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--oc-primary);
}

.order-chat-reply-text {
    font-size: 12px;
    color: var(--oc-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

.order-chat-reply-cancel-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.order-chat-reply-cancel-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Quick Templates Button & Popup */
.order-chat-templates-btn {
    background: transparent;
    border: none;
    color: #f59e0b;
    font-size: 17px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-chat-templates-btn:hover {
    background: rgba(245, 158, 11, 0.12);
    transform: scale(1.1);
}

.order-chat-templates-popup {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 10px;
    width: 360px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid var(--oc-border-color);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    animation: ocFadeIn 0.15s ease;
}

.order-chat-templates-header {
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
}

.order-chat-templates-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-chat-template-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    padding: 6px 8px 2px 8px;
}

.order-chat-template-item {
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    font-size: 12.5px;
    line-height: 1.35;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.order-chat-template-item:hover {
    background: var(--oc-primary-light);
    border-color: var(--oc-primary-25);
    color: var(--oc-primary);
    transform: translateX(2px);
}

/* ==========================================================================
   WebRTC Video Calls & Screen Sharing
   ========================================================================== */
.order-chat-call-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--oc-primary);
    color: #ffffff !important;
    border: none;
    padding: 0 14px;
    height: 36px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px var(--oc-primary-25);
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

.order-chat-call-trigger-btn:hover {
    background: var(--oc-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px var(--oc-primary-35);
}

.order-chat-call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    animation: ocFadeIn 0.25s ease;
}

/* Call Cards (Ringing / Incoming - Light Theme) */
.order-chat-call-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    padding: 36px 32px;
    width: 360px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.18);
    color: #0f172a;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: ocSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.order-chat-call-avatar-pulse {
    position: relative;
    width: 90px;
    height: 90px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-chat-call-avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--oc-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #ffffff;
    z-index: 2;
    box-shadow: 0 10px 25px var(--oc-primary-35);
}

.order-chat-call-avatar-circle.incoming {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.order-chat-pulse-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid var(--oc-primary-45);
    animation: ocCallPulse 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.incoming~.order-chat-pulse-ring,
.order-chat-call-avatar-circle.incoming+.order-chat-pulse-ring {
    border-color: rgba(16, 185, 129, 0.6);
}

.order-chat-pulse-ring.ring-2 {
    animation-delay: 0.75s;
}

@keyframes ocCallPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.order-chat-call-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #0f172a;
}

.order-chat-call-sub {
    font-size: 13.5px;
    color: #64748b;
    margin: 0 0 28px 0;
}

.order-chat-call-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.order-chat-call-btn-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.call-btn-end {
    background: #ef4444;
}

.call-btn-end:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.call-btn-accept {
    background: #22c55e;
    animation: ocAcceptBounce 1s infinite alternate;
}

.call-btn-accept:hover {
    background: #16a34a;
    transform: scale(1.15);
}

@keyframes ocAcceptBounce {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
        box-shadow: 0 10px 25px rgba(34, 197, 94, 0.5);
    }
}

/* Video Room (Light Theme - Edge-to-Edge Full Page) */
.order-chat-video-room {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    background: #ffffff;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: fixed;
    inset: 0;
    box-shadow: none;
    z-index: 10000000;
    margin: 0;
}

.order-chat-vr-header {
    padding: 8px 20px;
    min-height: 48px;
    max-height: 48px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #0f172a;
    z-index: 10;
    box-sizing: border-box;
}

.order-chat-vr-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
}

.order-chat-vr-live-badge {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
}

.order-chat-vr-live-badge .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: ocPulse 1.2s infinite;
}

.order-chat-vr-timer {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-family: monospace;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.order-chat-vr-btn-icon {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.order-chat-vr-btn-icon:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.06);
}

/* Stage Area */
.order-chat-vr-stage {
    flex: 1;
    position: relative;
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    padding: 0;
}

.order-chat-vr-stage-main {
    flex: 1;
    min-width: 0;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    transition: all 0.25s ease;
}

.order-chat-remote-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0f172a;
    border-radius: 16px;
}

.order-chat-video-placeholder {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 14px;
}

.order-chat-video-placeholder i {
    font-size: 48px;
    color: #94a3b8;
}

.order-chat-screen-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    background: var(--oc-primary);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    z-index: 5;
    box-shadow: 0 4px 12px var(--oc-primary-25);
}

/* Local PIP Video */
.order-chat-local-pip-container {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 220px;
    height: 140px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    background: #0f172a;
    z-index: 20;
    transition: all 0.3s ease;
}

.order-chat-local-pip-container:hover {
    transform: scale(1.04);
    border-color: var(--oc-primary);
}

.order-chat-local-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.order-chat-local-pip-label {
    position: absolute;
    bottom: 6px;
    left: 8px;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    font-size: 10.5px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Controls Bar (Light Theme) */
.order-chat-vr-controls {
    padding: 16px 24px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
}

.order-chat-control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
    padding: 10px 18px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
    min-width: 86px;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
}

.order-chat-control-btn i {
    font-size: 18px;
}

.order-chat-control-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.order-chat-control-btn.is-muted {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.control-btn-screen {
    background: var(--oc-primary-08);
    border-color: var(--oc-primary-25);
    color: var(--oc-primary);
}

.control-btn-screen:hover,
.control-btn-screen.is-active {
    background: var(--oc-primary);
    color: #ffffff;
    border-color: var(--oc-primary);
    box-shadow: 0 4px 14px var(--oc-primary-35);
}

.control-btn-hangup {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    margin-left: 12px;
}

.control-btn-hangup:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   Google Meet Style Device Settings Modal
   ========================================================================== */
.order-chat-settings-card {
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    animation: ocModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.order-chat-settings-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.order-chat-settings-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-chat-settings-card-title i {
    color: var(--oc-primary);
    font-size: 18px;
}

.order-chat-settings-card-body {
    padding: 22px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-chat-device-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-chat-device-group label {
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-chat-device-group label i {
    color: var(--oc-primary);
    font-size: 15px;
}

.order-chat-select-wrapper {
    position: relative;
    width: 100%;
}

.order-chat-device-select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.order-chat-device-select:focus {
    border-color: var(--oc-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--oc-primary-15);
}

.order-chat-device-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-chat-test-sound-btn {
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.order-chat-test-sound-btn:hover {
    background: var(--oc-primary-08);
    border-color: var(--oc-primary);
    color: var(--oc-primary);
}

.order-chat-test-sound-btn.is-playing {
    background: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
    animation: ocPulseGreen 1s infinite alternate;
}

/* Mic Level Indicator Bar */
.order-chat-mic-meter-container {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.order-chat-mic-meter-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #22c55e, var(--oc-primary));
    border-radius: 4px;
    transition: width 0.08s ease-out;
}

.order-chat-device-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 4px 0 0 0;
    line-height: 1.4;
}

/* Camera Preview Box */
.order-chat-camera-preview-box {
    width: 100%;
    height: 180px;
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
    margin-top: 6px;
    position: relative;
    border: 2px solid #e2e8f0;
}

.order-chat-camera-preview-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.order-chat-settings-card-footer {
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    background: #f8fafc;
}

/* ==========================================================================
   Video Call Choice & Scheduling Modal
   ========================================================================== */
.order-chat-choice-card {
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    animation: ocModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.order-chat-choice-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.order-chat-choice-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-chat-choice-title i {
    color: var(--oc-primary);
}

.order-chat-choice-body {
    padding: 22px 24px;
}

.order-chat-choice-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.order-chat-choice-opt {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.order-chat-choice-opt:hover {
    background: #ffffff;
    border-color: var(--oc-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 106, 244, 0.12);
}

.order-chat-opt-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.order-chat-opt-icon.opt-now {
    background: #dcfce7;
    color: #16a34a;
}

.order-chat-opt-icon.opt-schedule {
    background: var(--oc-primary-15);
    color: var(--oc-primary);
}

.order-chat-opt-info {
    flex: 1;
}

.order-chat-opt-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}

.order-chat-opt-desc {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.35;
}

.order-chat-opt-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    border: none;
    background: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.order-chat-choice-opt:hover .order-chat-opt-action-btn {
    background: var(--oc-primary);
    color: #ffffff;
    transform: scale(1.08);
}

/* Embedded Schedule Form */
.order-chat-schedule-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.order-chat-btn-back {
    background: #f1f5f9;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.order-chat-btn-back:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.order-chat-schedule-form-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.order-chat-form-row {
    display: flex;
    gap: 12px;
}

.order-chat-form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-chat-form-col label,
.order-chat-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-chat-form-col label i,
.order-chat-form-group label i {
    color: var(--oc-primary);
}

.order-chat-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13.5px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.order-chat-input:focus {
    border-color: var(--oc-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--oc-primary-15);
}

/* ==========================================================================
   Scheduled Call Card inside Chat Messages
   ========================================================================== */
.order-chat-scheduled-bubble-card {
    margin-top: 8px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-chat-scheduled-bubble-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-chat-scheduled-bubble-badge {
    background: var(--oc-primary-15);
    color: var(--oc-primary);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.order-chat-scheduled-bubble-time {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.order-chat-scheduled-bubble-topic {
    font-size: 13px;
    color: #475569;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--oc-primary);
}

.order-chat-scheduled-bubble-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.order-chat-btn-join-call {
    flex: 1;
    height: 38px;
    background: #22c55e;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.25);
}

.order-chat-btn-join-call:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.order-chat-btn-cancel-call {
    height: 38px;
    padding: 0 12px;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-chat-btn-cancel-call:hover {
    background: #fecaca;
}

/* ==========================================================================
   Pre-Call Lobby Screen (Google Meet / Zoom Green Room Style)
   ========================================================================== */
.order-chat-lobby-card {
    background: #ffffff;
    border-radius: 24px;
    width: 90%;
    max-width: 680px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    animation: ocModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.order-chat-lobby-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.order-chat-lobby-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-chat-lobby-title i {
    color: var(--oc-primary);
}

.order-chat-lobby-body {
    display: flex;
    gap: 20px;
    padding: 24px;
}

@media (max-width: 650px) {
    .order-chat-lobby-body {
        flex-direction: column;
    }
}

.order-chat-lobby-preview-wrapper {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.order-chat-lobby-video-container {
    width: 100%;
    height: 220px;
    background: #0f172a;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    border: 2px solid #e2e8f0;
}

.order-chat-lobby-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.order-chat-lobby-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    background: #0f172a;
}

.order-chat-lobby-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 28px;
}

.order-chat-lobby-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
}

.order-chat-lobby-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.order-chat-lobby-btn:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.order-chat-lobby-btn.muted {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #ef4444;
}

.order-chat-lobby-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.order-chat-lobby-info h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.order-chat-lobby-info p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.order-chat-lobby-devices-summary {
    margin: 16px 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-chat-lobby-dev-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
}

.order-chat-lobby-dev-item i {
    color: var(--oc-primary);
    width: 16px;
    text-align: center;
}

.order-chat-lobby-dev-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-chat-lobby-dev-text .dev-label {
    font-weight: 600;
    color: #334155;
    margin-right: 4px;
}

.order-chat-lobby-dev-text .dev-name {
    color: #64748b;
}

/* ==========================================================================
   Camera Off Placeholders in Active Call Room
   ========================================================================== */
.order-chat-avatar-circle-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #1e293b;
    border: 3px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 44px;
    margin-bottom: 14px;
    animation: ocPulseAvatar 2.5s infinite;
}

@keyframes ocPulseAvatar {
    0% {
        box-shadow: 0 0 0 0 rgba(71, 85, 105, 0.4);
    }

    70% {
        box-shadow: 0 0 0 16px rgba(71, 85, 105, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(71, 85, 105, 0);
    }
}

.order-chat-local-pip-cam-off {
    position: absolute;
    inset: 0;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-size: 26px;
    border-radius: 12px;
    z-index: 2;
}

/* ==========================================================================
   Multi-Party Video Grid (Up to 5 Participants & Screen Share Stage)
   ========================================================================== */
.order-chat-vr-peers-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.order-chat-vr-peers-badge i {
    color: #38bdf8;
}

/* Prominent Screen Share Top Banner (Google Meet Style) */
.order-chat-screen-share-banner {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 197, 94, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 197, 94, 0.25);
    border-radius: 50px;
    padding: 6px 16px 6px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 50;
    animation: ocBannerSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ocBannerSlideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

.screen-share-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
}

.screen-share-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    animation: ocScreenDotPulse 1.4s infinite;
}

@keyframes ocScreenDotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.8);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.order-chat-btn-stop-share {
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.order-chat-btn-stop-share:hover {
    background: #dc2626;
    transform: scale(1.04);
}

/* Multi-Party Video Grid Layouts */
.order-chat-video-grid {
    width: 100%;
    height: 100%;
    display: grid;
    gap: 12px;
    padding: 12px;
    box-sizing: border-box;
    align-content: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* 1 Participant (Solo / Waiting) */
.order-chat-video-grid.grid-1 {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
}

/* 2 Participants */
.order-chat-video-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
}

/* 3 Participants */
.order-chat-video-grid.grid-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.order-chat-video-grid.grid-3 .order-chat-peer-tile:first-child {
    grid-column: span 2;
    max-width: 65%;
    margin: 0 auto;
    width: 100%;
}

/* 4 Participants (2x2 Grid) */
.order-chat-video-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

/* 5 Participants (2 Top + 3 Bottom) */
.order-chat-video-grid.grid-5 {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: 1fr 1fr;
}

.order-chat-video-grid.grid-5 .order-chat-peer-tile:nth-child(1),
.order-chat-video-grid.grid-5 .order-chat-peer-tile:nth-child(2) {
    grid-column: span 3;
}

.order-chat-video-grid.grid-5 .order-chat-peer-tile:nth-child(3),
.order-chat-video-grid.grid-5 .order-chat-peer-tile:nth-child(4),
.order-chat-video-grid.grid-5 .order-chat-peer-tile:nth-child(5) {
    grid-column: span 2;
}

/* Pin / Spotlight Action Button on Peer Tile (Идеально круглая кнопка) */
.order-chat-peer-pin-btn {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    cursor: pointer !important;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 15 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    box-sizing: border-box !important;
}

.order-chat-peer-tile:hover .order-chat-peer-pin-btn,
.order-chat-peer-tile.is-pinned .order-chat-peer-pin-btn {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.order-chat-peer-pin-btn:hover {
    background: #ffffff !important;
    color: var(--ast-global-color-0, #3182ce) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(49, 130, 206, 0.3) !important;
}

.order-chat-peer-tile.is-pinned .order-chat-peer-pin-btn {
    background: var(--ast-global-color-0, #3182ce) !important;
    color: #ffffff !important;
    border-color: var(--ast-global-color-0, #3182ce) !important;
    box-shadow: 0 4px 14px rgba(49, 130, 206, 0.4) !important;
}

/* ==========================================================================
   Spotlight / Pin Mode Layout (Выбор главного экрана в группе)
   ========================================================================== */
.order-chat-video-grid.has-spotlight {
    display: grid !important;
    grid-template-columns: 1fr 200px !important;
    grid-auto-rows: minmax(100px, 140px) !important;
    gap: 12px !important;
    padding: 12px !important;
    align-content: stretch !important;
    justify-content: stretch !important;
}

/* Main Spotlight / Pinned Stage */
.order-chat-video-grid.has-spotlight .order-chat-peer-tile.is-pinned {
    grid-column: 1 / 2 !important;
    grid-row: 1 / span 5 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 20px !important;
    border: 2px solid var(--ast-global-color-0, #3182ce) !important;
    box-shadow: 0 10px 30px rgba(49, 130, 206, 0.18) !important;
}

.order-chat-video-grid.has-spotlight .order-chat-peer-tile.is-pinned .order-chat-peer-video {
    object-fit: contain !important;
    background: #0f172a !important;
}

/* Unpinned Side Thumbnails */
.order-chat-video-grid.has-spotlight .order-chat-peer-tile:not(.is-pinned) {
    grid-column: 2 / 3 !important;
    grid-row: auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 90px !important;
    max-height: 140px !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.order-chat-video-grid.has-spotlight .order-chat-peer-tile:not(.is-pinned):hover {
    transform: scale(1.03) !important;
    border-color: var(--ast-global-color-0, #3182ce) !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15) !important;
}

@media screen and (max-width: 782px) {
    .order-chat-video-grid.has-spotlight {
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr auto !important;
    }
    .order-chat-video-grid.has-spotlight .order-chat-peer-tile.is-pinned {
        grid-column: 1 / -1 !important;
        grid-row: 1 / 2 !important;
        min-height: 220px !important;
    }
    .order-chat-video-grid.has-spotlight .order-chat-peer-tile:not(.is-pinned) {
        grid-column: auto !important;
        grid-row: 2 / 3 !important;
        height: 80px !important;
        min-height: 80px !important;
    }
}

/* Peer Video Tile (Light Theme with Smooth Rounded Corners) */
.order-chat-peer-tile {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    min-height: 180px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.order-chat-peer-tile:hover {
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.order-chat-peer-tile.is-talking {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.order-chat-peer-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 19px;
    background: #0f172a;
}

.order-chat-peer-badge {
    position: absolute;
    bottom: 12px;
    left: 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 5px 12px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.peer-role-tag {
    font-size: 10px;
    padding: 2px 7px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-weight: 700;
}

.peer-mic-icon.is-muted {
    color: #ef4444;
}

.peer-mic-icon.is-active {
    color: #22c55e;
}

.order-chat-peer-cam-off {
    position: absolute;
    inset: 0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 13px;
    gap: 10px;
    z-index: 5;
    border-radius: 19px;
}

.order-chat-peer-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 28px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* Screen Share Stage Display (When Screen Sharing is active) */
.order-chat-screen-stage {
    position: absolute;
    inset: 12px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.order-chat-screen-video-elem {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0f172a;
    border-radius: 19px;
}

.order-chat-screen-stage-badge {
    position: absolute;
    top: 14px;
    left: 16px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 6px 14px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 25;
}

/* Compact Floating Strip of Participants during Screen Share */
.order-chat-video-grid.stage-screen-active {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: auto;
    height: auto;
    max-height: 140px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 0;
    z-index: 30;
    background: transparent;
}

.order-chat-video-grid.stage-screen-active .order-chat-peer-tile {
    width: 160px;
    height: 100px;
    min-height: 100px;
    border-radius: 16px;
    border: 2px solid #ffffff;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.18);
}

/* ==========================================================================
   Device Settings Card & Selects Styling
   ========================================================================== */
.order-chat-settings-card {
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    z-index: 10000060;
    animation: ocModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.order-chat-settings-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid #f1f5f9;
}

.order-chat-settings-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-chat-settings-card-header h3 i {
    color: var(--ast-global-color-0, #3182ce);
}

.order-chat-settings-card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 70vh;
    overflow-y: auto;
}

.order-chat-device-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-chat-device-group label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-chat-device-group label i {
    color: var(--ast-global-color-0, #3182ce);
}

.order-chat-select-wrapper {
    position: relative;
    width: 100%;
}

.order-chat-device-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-chat-test-sound-btn {
    height: 40px;
    padding: 0 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.order-chat-test-sound-btn:hover {
    background: var(--ast-global-color-0, #3182ce);
    color: #ffffff;
    border-color: var(--ast-global-color-0, #3182ce);
}

.order-chat-mic-meter-container {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.order-chat-mic-meter-bar {
    height: 100%;
    width: 0%;
    background: #22c55e;
    border-radius: 3px;
    transition: width 0.08s ease;
}

.order-chat-camera-preview-box {
    width: 100%;
    height: 140px;
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-top: 4px;
}

.order-chat-camera-preview-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

/* ==========================================================================
   In-Call Ephemeral Room Chat (Временный общий чат звонка)
   ========================================================================== */
.order-chat-control-btn {
    position: relative;
}

.order-chat-call-chat-badge {
    position: absolute;
    top: -4px;
    right: 4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* ==========================================================================
   In-Call Ephemeral Room Side Chat (Временный боковой чат звонка)
   ========================================================================== */
.order-chat-call-chat-pane {
    width: 360px;
    min-width: 320px;
    max-width: 400px;
    height: 100%;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    z-index: 25;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    position: relative;
    flex-shrink: 0;
    animation: ocSlideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ocSlideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.order-chat-call-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.order-chat-call-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-chat-call-chat-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(49, 130, 206, 0.1);
    color: var(--ast-global-color-0, #3182ce);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.order-chat-call-chat-title-text h4 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.order-chat-call-chat-sub {
    font-size: 11px;
    color: #64748b;
    display: block;
    margin-top: 1px;
}

.order-chat-call-chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-chat-call-chat-synced-tag {
    font-size: 11px;
    font-weight: 700;
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #059669;
    padding: 3px 9px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.order-chat-call-chat-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s ease;
}

.order-chat-call-chat-close:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

.order-chat-call-chat-notice {
    padding: 8px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-chat-call-chat-notice i {
    color: #0ea5e9;
    font-size: 13px;
    flex-shrink: 0;
}

.order-chat-call-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-chat-call-chat-empty {
    margin: auto;
    text-align: center;
    padding: 24px 12px;
}

.empty-icon-bubble {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 10px auto;
}

.order-chat-call-chat-empty h5 {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 4px 0;
}

.order-chat-call-chat-empty p {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

.order-chat-call-msg-item {
    display: flex;
    flex-direction: column;
    max-width: 88%;
    gap: 3px;
}

.order-chat-call-msg-item.is-me {
    align-self: flex-end;
    align-items: flex-end;
}

.order-chat-call-msg-item.is-other {
    align-self: flex-start;
    align-items: flex-start;
}

.order-chat-call-msg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.order-chat-call-msg-author {
    font-weight: 700;
    color: #334155;
}

.order-chat-call-msg-item.is-me .order-chat-call-msg-author {
    color: #0284c7;
}

.order-chat-call-role-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.order-chat-call-role-badge.role-tech {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}

.order-chat-call-role-badge.role-manager {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.order-chat-call-role-badge.role-supervisor {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.order-chat-call-role-badge.role-doc {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.order-chat-call-msg-time {
    font-size: 10px;
    color: #94a3b8;
}

.order-chat-call-msg-bubble {
    padding: 9px 13px;
    font-size: 13px;
    line-height: 1.42;
    word-break: break-word;
}

.order-chat-call-msg-item.is-me .order-chat-call-msg-bubble {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.22);
}

.order-chat-call-msg-item.is-other .order-chat-call-msg-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 16px 16px 16px 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.order-chat-call-chat-form {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 10px 12px;
}

.order-chat-call-input-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 3px 4px 3px 14px;
    transition: all 0.2s ease;
}

.order-chat-call-input-box:focus-within {
    background: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.order-chat-call-chat-input {
    flex: 1 !important;
    height: 32px !important;
    background: transparent !important;
    border: none !important;
    color: #0f172a !important;
    font-size: 13px !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.order-chat-call-chat-input::placeholder {
    color: #94a3b8 !important;
}

.order-chat-call-chat-send-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0284c7;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.order-chat-call-chat-send-btn:hover {
    background: #0369a1;
    transform: scale(1.05);
}

@media screen and (max-width: 782px) {
    .order-chat-call-chat-pane {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        z-index: 60;
    }
}

/* Адаптация отображения сообщений основного чата внутри боковой панели звонка */
#order-chat-call-chat-messages {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 12px;
}

#order-chat-call-chat-messages .order-chat-msg-item {
    max-width: 95% !important;
    margin-bottom: 8px !important;
}

#order-chat-call-chat-messages .order-chat-msg-bubble {
    padding: 8px 11px !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
    border-radius: 14px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#order-chat-call-chat-messages .order-chat-msg-avatar {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
    margin-right: 6px !important;
}

#order-chat-call-chat-messages .order-chat-msg-meta {
    font-size: 10px !important;
    gap: 4px !important;
    margin-bottom: 2px !important;
}

#order-chat-call-chat-messages .order-chat-role-badge,
#order-chat-call-chat-messages .order-chat-call-role-badge {
    font-size: 9px !important;
    padding: 1px 5px !important;
    line-height: 1.2 !important;
}

#order-chat-call-chat-messages .order-chat-lazy-img-card {
    padding: 6px 8px !important;
    font-size: 11.5px !important;
    max-width: 100% !important;
    gap: 6px !important;
}

#order-chat-call-chat-messages .order-chat-lazy-img-card .order-chat-lazy-img-btn {
    padding: 3px 7px !important;
    font-size: 10.5px !important;
}

#order-chat-call-chat-messages .order-chat-call-log-card {
    padding: 6px 9px !important;
    min-width: 170px !important;
    gap: 6px !important;
    border-radius: 12px !important;
}

#order-chat-call-chat-messages .order-chat-call-log-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
}

#order-chat-call-chat-messages .order-chat-call-log-title {
    font-size: 11.5px !important;
}

#order-chat-call-chat-messages .order-chat-call-log-sub {
    font-size: 10px !important;
}

#order-chat-call-chat-messages .order-chat-call-log-callback-btn {
    height: 24px !important;
    padding: 2px 7px !important;
    font-size: 10.5px !important;
    border-radius: 10px !important;
}

#order-chat-call-chat-messages .order-chat-custom-audio-player {
    min-width: 160px !important;
    max-width: 100% !important;
    height: 34px !important;
    padding: 3px 6px !important;
}

#order-chat-call-chat-messages .order-chat-quote-bubble {
    padding: 3px 7px !important;
    font-size: 10.5px !important;
    margin-bottom: 4px !important;
}

#order-chat-call-chat-messages .order-chat-doc-preview {
    padding: 6px 8px !important;
    font-size: 11.5px !important;
    max-width: 100% !important;
}

#order-chat-call-chat-messages .order-chat-date-divider {
    margin: 6px auto !important;
    padding: 2px 8px !important;
    font-size: 10px !important;
}

#order-chat-call-chat-messages .order-chat-load-more-btn {
    padding: 3px 8px !important;
    font-size: 10.5px !important;
}

#order-chat-call-chat-messages .order-chat-img-preview {
    max-width: 100% !important;
    max-height: 160px !important;
    border-radius: 8px !important;
    object-fit: contain !important;
}

.order-chat-settings-card-footer {
    padding: 14px 22px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   Call Log Notification Cards in Chat (Уведомления о звонках в ленте)
   ========================================================================== */
.order-chat-call-log-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    min-width: 250px;
    max-width: 100%;
}

.order-chat-msg-item.me .order-chat-call-log-card {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    backdrop-filter: blur(8px);
}

.order-chat-call-log-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-chat-call-log-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.order-chat-call-log-icon.is-completed {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.order-chat-call-log-icon.is-missed {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.order-chat-call-log-icon.is-declined {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #ffedd5;
}

.order-chat-msg-item.me .order-chat-call-log-icon {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.order-chat-call-log-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-chat-call-log-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.order-chat-msg-item.me .order-chat-call-log-title {
    color: #ffffff;
}

.order-chat-call-log-sub {
    font-size: 11.5px;
    color: #64748b;
}

.order-chat-msg-item.me .order-chat-call-log-sub {
    color: rgba(255, 255, 255, 0.85);
}

.order-chat-call-log-callback-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 18px !important;
    padding: 6px 14px !important;
    height: 32px !important;
    line-height: 18px !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    font-family: inherit !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    outline: none !important;
}

.order-chat-call-log-callback-btn span {
    display: inline !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: inherit !important;
    line-height: inherit !important;
}

.order-chat-call-log-callback-btn i {
    font-size: 11px !important;
    color: inherit !important;
    line-height: inherit !important;
}

.order-chat-call-log-callback-btn:hover {
    background: var(--ast-global-color-0, #3182ce) !important;
    color: #ffffff !important;
    border-color: var(--ast-global-color-0, #3182ce) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(49, 130, 206, 0.25) !important;
}

.order-chat-call-log-callback-btn:active {
    transform: translateY(0) !important;
}

.order-chat-msg-item.me .order-chat-call-log-callback-btn {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.order-chat-msg-item.me .order-chat-call-log-callback-btn:hover {
    background: #ffffff !important;
    color: var(--ast-global-color-0, #3182ce) !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* ==========================================================================
   Order Chat Unread Counter Badge (Красный бейдж непрочитанных сообщений)
   ========================================================================== */
.order-chat-unread-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 10px;
    text-align: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
    border: 2px solid #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    pointer-events: none;
    box-sizing: border-box;
    animation: ocBadgePulse 2.2s infinite ease-in-out;
}

@keyframes ocBadgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
    }
    50% {
        transform: scale(1.12);
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.7);
    }
}

.button.case-action-btn.order-chat-open-btn,
.order-chat-open-btn {
    position: relative !important;
}

/* ==========================================================================
   Live Active Call Bar in Chat (Плавающая плашка активного звонка)
   ========================================================================== */
.order-chat-active-call-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    border-radius: 14px;
    margin: 10px 16px 6px 16px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    animation: ocSlideDown 0.3s ease-out;
    z-index: 25;
    flex-shrink: 0;
}

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

.order-chat-active-call-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-chat-active-call-pulse {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: ocLivePulse 1.6s infinite cubic-bezier(0.66, 0, 0, 1);
    flex-shrink: 0;
}

@keyframes ocLivePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.order-chat-active-call-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-chat-active-call-meta strong {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.order-chat-active-call-meta span {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.2;
}

.order-chat-btn-join-live-call {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #ffffff !important;
    color: #059669 !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 6px 14px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-family: inherit !important;
    height: auto !important;
    line-height: 1.3 !important;
}

.order-chat-btn-join-live-call:hover {
    background: #f0fdf4 !important;
    transform: scale(1.04) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
}

/* Badge in Dialog List */
.tg-dialog-live-call-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecfdf5;
    color: #059669;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    border: 1px solid #a7f3d0;
    margin-left: 6px;
    animation: ocLivePulseBadge 2s infinite;
}

.tg-dialog-live-call-badge .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

@keyframes ocLivePulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.04); }
}

/* Live Call Indicator on doctor view-order button */
.button.case-action-btn.order-chat-open-btn.has-live-call {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3) !important;
    animation: ocBtnCallPulse 2s infinite !important;
}

@keyframes ocBtnCallPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* ============================================================
   Load More Older Messages Button
   ============================================================ */
.order-chat-load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0 8px 0;
    width: 100%;
}

.order-chat-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--oc-primary, #2C6AF4);
    border: 1px solid #e2e8f0;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tg-messages-scroll .order-chat-load-more-btn {
    background: #ffffff;
    color: var(--oc-primary, #2C6AF4);
    border: 1px solid #dbeafe;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.order-chat-load-more-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
}

.tg-messages-scroll .order-chat-load-more-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.order-chat-load-more-btn:active {
    transform: translateY(0);
}

.order-chat-load-more-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.order-chat-load-more-btn.is-loading i {
    animation: ocSpin 1s linear infinite;
}

/* ============================================================
   Lazy Click-to-Load Image Attachment
   ============================================================ */
.order-chat-lazy-img-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 14px;
    max-width: 320px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    user-select: none;
    margin: 4px 0;
}

.order-chat-msg-item.me .order-chat-lazy-img-card {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.order-chat-lazy-img-card:hover {
    background: #f1f5f9;
    border-color: var(--oc-primary, #2C6AF4);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(44, 106, 244, 0.1);
}

.order-chat-msg-item.me .order-chat-lazy-img-card:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.order-chat-lazy-img-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--oc-primary, #2C6AF4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.order-chat-msg-item.me .order-chat-lazy-img-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.order-chat-lazy-img-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.order-chat-lazy-img-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    line-height: 1.2;
}

.order-chat-msg-item.me .order-chat-lazy-img-label {
    color: rgba(255, 255, 255, 0.8);
}

.order-chat-lazy-img-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.order-chat-msg-item.me .order-chat-lazy-img-name {
    color: #ffffff;
}

.order-chat-lazy-img-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--oc-primary, #2C6AF4);
    background: #eff6ff;
    padding: 6px 12px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.order-chat-msg-item.me .order-chat-lazy-img-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--oc-primary, #2C6AF4);
}

.order-chat-lazy-img-card.is-loading .order-chat-lazy-img-btn {
    opacity: 0.85;
    pointer-events: none;
}

.order-chat-lazy-img-card.is-loading .order-chat-lazy-img-btn i {
    animation: ocSpin 1s linear infinite;
}

.loaded-fade-in {
    animation: ocFadeIn 0.3s ease-out;
}

@keyframes ocFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes ocSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}