/* ============================================================
   CHAT REDESIGN 2.0 - Shared Design System
   ============================================================
   Reusable design tokens, component classes, and page-specific
   styles for the chat/2-way texting onboarding redesign.
   ============================================================ */

/* ===== DESIGN TOKENS ===== */
/* Scoped to both onboarding (.chat-home) and chat-central (.cr-chat-central) */
.chat-home,
.cr-chat-central {
    /* Colors - Primary */
    --cr-color-primary: #4579bd;
    --cr-color-primary-hover: #3666ae;
    --cr-color-primary-light: rgba(125, 161, 209, 0.24);
    --cr-color-primary-light-hover: rgba(125, 161, 209, 0.32);

    /* Colors - Status */
    --cr-color-success: #1fc16b;
    --cr-color-error: #fb3748;
    --cr-color-warning-bg: #fff8e1;
    --cr-color-warning-border: #ffe082;

    /* Colors - Text */
    --cr-color-text-strong: #0e121b;
    --cr-color-text-sub: #525866;
    --cr-color-text-soft: #99a0ae;
    --cr-color-text-disabled: #717784;

    /* Colors - Background */
    --cr-color-bg-white: #ffffff;
    --cr-color-bg-weak: #f5f7fa;
    --cr-color-bg-gray: #f2f5f8;
    --cr-color-bg-disabled: #e1e4ea;

    /* Colors - Border */
    --cr-color-border: #e1e4ea;
    --cr-color-border-dark: #cacfd8;

    /* Colors - Badge */
    --cr-color-badge-yellow-bg: #ffecc0;
    --cr-color-badge-yellow-text: #624c18;
    --cr-color-badge-gray-bg: #f2f5f8;
    --cr-color-badge-gray-text: #717784;
    --cr-color-badge-coming-soon-bg: #e1e4ea;
    --cr-color-badge-coming-soon-text: #222530;

    /* Colors - Pricing Card */
    --cr-color-pricing-blue-start: #4d7fc0;
    --cr-color-pricing-blue-end: #5a88c4;

    /* Colors - Info */
    --cr-color-info-bg: #e8f0fe;
    --cr-color-info-icon: #335cff;
    --cr-color-info-soft-bg: #ebf1ff;

    /* Typography */
    --cr-font-family: 'Inter', sans-serif;
    --cr-font-family-display: 'Inter Display', sans-serif;

    /* Font Sizes */
    --cr-font-size-xs: 12px;
    --cr-font-size-sm: 14px;
    --cr-font-size-md: 16px;
    --cr-font-size-lg: 18px;
    --cr-font-size-xl: 20px;
    --cr-font-size-2xl: 24px;
    --cr-font-size-3xl: 32px;

    /* Line Heights */
    --cr-line-height-xs: 16px;
    --cr-line-height-sm: 20px;
    --cr-line-height-md: 24px;
    --cr-line-height-lg: 28px;
    --cr-line-height-xl: 32px;
    --cr-line-height-2xl: 40px;

    /* Font Weights */
    --cr-font-weight-regular: 400;
    --cr-font-weight-medium: 500;

    /* Spacing */
    --cr-space-1: 4px;
    --cr-space-2: 8px;
    --cr-space-3: 10px;
    --cr-space-4: 12px;
    --cr-space-5: 16px;
    --cr-space-6: 20px;
    --cr-space-7: 24px;
    --cr-space-8: 32px;

    /* Radii */
    --cr-radius-input: 8px;
    --cr-radius-btn: 10px;
    --cr-radius-card: 16px;
    --cr-radius-pill: 999px;

    /* Shadows */
    --cr-shadow-sm: 0px 1px 2px 0px rgba(10, 13, 20, 0.03);
    --cr-shadow-md: 0px 16px 32px -12px rgba(14, 18, 27, 0.1);
    --cr-shadow-card-header: 0px 6px 10px 0px rgba(14, 18, 27, 0.06), 0px 2px 4px 0px rgba(14, 18, 27, 0.03);

    /* Chat Central - Specific */
    --cr-color-msg-outgoing: rgba(125, 161, 209, 0.16);
    --cr-chat-sidebar-width: 284px;
}


/* =============================================================
   CHAT CENTRAL - LAYOUT SKELETON
   ============================================================= */

/* Three-panel layout: sidebar | body | right-panel */
.cr-chat-central {
    display: flex;
    height: 100%;
    overflow: hidden;
    font-family: var(--cr-font-family);
}

/* Left sidebar — conversation list */
.cr-chat-panel {
    width: var(--cr-chat-sidebar-width);
    background: var(--cr-color-bg-white);
    border-right: 1px solid var(--cr-color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Center — header + thread + compose */
.cr-chat-body {
    display: flex;
    flex: 2;
    flex-direction: column;
    overflow: hidden;
}

/* Right — collapsible info/templates/scheduled panel */
.cr-chat-right-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 0;
    border-left: none;
    overflow: hidden;
    justify-content: flex-start;
    transition: max-width 250ms ease, border-left 250ms ease;
}

.cr-chat-right-panel.expanded {
    max-width: 400px;
    border-left: 1px solid var(--cr-color-border);
    overflow: visible;
}


/* =============================================================
   CHAT CENTRAL — SIDEBAR US-1
   ============================================================= */

/* New Text button wrapper */
.cr-new-text-btn-area {
    padding: 20px 22px 0;
}

/* Divider inside the sidebar topbar */
.cr-chat-panel .cr-divider {
    margin: 0 22px;
}

/* Search bar */
.cr-chat-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-input);
    box-shadow: var(--cr-shadow-sm);
    padding: 8px 8px 8px 10px;
    margin: 20px 22px 16px;
}

.cr-chat-search-icon {
    color: var(--cr-color-text-soft);
    font-size: 16px;
    flex-shrink: 0;
}

.cr-chat-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-strong);
    min-width: 0;
    padding: 0;
    box-shadow: none;
    height: auto;
}

.cr-chat-search-input::placeholder {
    color: var(--cr-color-text-soft);
}

.cr-chat-search-clear {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cr-color-text-soft);
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
}

.cr-chat-search-clear:hover {
    color: var(--cr-color-text-strong);
}

/* Conversation list container */
.cr-convo-list {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 8px;
}

/* Conversation item row */
.cr-convo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    margin: 0 12px 4px;
    border-radius: var(--cr-radius-input);
    cursor: pointer;
    transition: background 0.15s;
    min-height: 52px;
}

.cr-convo-item:hover {
    background: var(--cr-color-primary-light);
}

.cr-convo-item.active {
    background: var(--cr-color-primary-light);
}

/* Avatar circle with colored initials */
.cr-convo-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--cr-radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cr-font-family);
    font-size: 16px;
    font-weight: 500;
    flex-shrink: 0;
    line-height: 1;
}

/* Name + time column */
.cr-convo-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Row: name (left) + time (right) on same line */
.cr-convo-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    min-width: 0;
}

.cr-convo-name {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    font-weight: 500;
    color: var(--cr-color-text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 20px;
    flex: 1;
    min-width: 0;
}

.cr-convo-time {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    color: var(--cr-color-text-soft);
    line-height: 16px;
    flex-shrink: 0;
}

/* Last message snippet */
.cr-convo-snippet {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    color: var(--cr-color-text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 16px;
    display: block;
}

/* Chevron arrow at far right */
.cr-convo-chevron {
    color: var(--cr-color-text-soft);
    font-size: 12px;
    flex-shrink: 0;
}

/* Unread count badge */
.cr-convo-badge {
    background: var(--cr-color-error);
    color: #fff;
    font-family: var(--cr-font-family);
    font-size: 11px;
    font-weight: 500;
    min-width: 20px;
    height: 20px;
    border-radius: var(--cr-radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
}

/* Archive toggle */
.cr-archive-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
}

.cr-archive-toggle {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    flex-shrink: 0;
}

.cr-archive-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cr-archive-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    border-radius: var(--cr-radius-pill);
    cursor: pointer;
    transition: background-color 0.2s;
}

.cr-archive-toggle-slider::before {
    content: "";
    position: absolute;
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.cr-archive-toggle input:checked + .cr-archive-toggle-slider {
    background-color: var(--cr-color-primary);
}

.cr-archive-toggle input:checked + .cr-archive-toggle-slider::before {
    transform: translateX(14px);
}

.cr-archive-toggle-label {
    font-family: var(--cr-font-family);
    font-size: 12px;
    color: var(--cr-color-text-sub);
}

/* Archive button in conversation header */
.cr-archive-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--cr-color-border);
    border-radius: 4px;
    padding: 4px 10px;
    font-family: var(--cr-font-family);
    font-size: 13px;
    color: var(--cr-color-text-sub);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.cr-archive-btn:hover {
    background-color: var(--cr-color-bg-weak);
    border-color: var(--cr-color-text-sub);
}

/* Archived badge on conversation items */
.cr-archived-badge {
    font-family: var(--cr-font-family);
    font-size: 10px;
    background: var(--cr-color-bg-weak);
    color: var(--cr-color-text-sub);
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Dim archived conversations */
.cr-convo-archived {
    opacity: 0.75;
}

/* Empty state (no conversations / no search results) */
.cr-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
}

.cr-empty-state-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cr-empty-state-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cr-empty-state-text {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    font-weight: 500;
    color: var(--cr-color-text-soft);
    text-align: center;
    line-height: 20px;
}


/* =============================================================
   CHAT CENTRAL — MESSAGE THREAD US-3
   ============================================================= */

/* Outer scroll container — handles scroll + background + pushes messages to bottom */
.cr-msg-thread-outer {
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    background: var(--cr-color-bg-weak);
}

/* Spacer — neutralised; margin-top: auto on .cr-msg-thread handles bottom-alignment */
.cr-msg-thread-spacer {
    flex: 0 0 0;
}

/* Thread content — messages only */
.cr-msg-thread {
    display: flex;
    flex-direction: column;
    padding: 0 48px 6px;
    margin-top: auto; /* pushes messages to bottom when thread is short; collapses to 0 when overflowing */
}

/* Date badge (centered pill) */
.cr-date-badge-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
}

.cr-date-badge {
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-pill);
    padding: 6px 12px;
    box-shadow: var(--cr-shadow-md);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    font-weight: 500;
    color: #717784;
    white-space: nowrap;
}

/* Message group (one row per message) */
.cr-msg-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.cr-msg-incoming {
    flex-direction: row;
}

.cr-msg-outgoing {
    flex-direction: row-reverse;
}

/* Hide avatar for outgoing messages */
.cr-msg-outgoing .cr-msg-avatar {
    display: none;
}

/* Message avatar (in thread) */
.cr-msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--cr-radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cr-font-family);
    font-size: 16px;
    font-weight: 500;
    flex-shrink: 0;
    line-height: 1;
}

/* Bubble + timestamp column */
.cr-msg-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 70%;
}

.cr-msg-incoming .cr-msg-content {
    align-items: flex-start;
}

.cr-msg-outgoing .cr-msg-content {
    align-items: flex-end;
}

/* Incoming text bubble */
.cr-msg-bubble-incoming {
    background: var(--cr-color-bg-white);
    border-radius: 10px 10px 10px 4px;
    padding: 10px 14px;
    box-shadow: var(--cr-shadow-sm);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-sub);
    line-height: 20px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Outgoing text bubble */
.cr-msg-bubble-outgoing {
    background: var(--cr-color-msg-outgoing);
    border-radius: 10px 10px 4px 10px;
    padding: 10px 14px;
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-strong);
    line-height: 20px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Timestamp below bubble */
.cr-msg-timestamp {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    color: var(--cr-color-text-sub);
    line-height: 16px;
}

.cr-msg-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.cr-msg-sender-name {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    color: var(--cr-color-text-sub);
    line-height: 16px;
}

/* Image attachments */
.cr-msg-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cr-msg-image img {
    height: 200px;
    max-width: 300px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

/* Opt-out warning banner */
.cr-opt-out-banner {
    margin: 0 0 10px;
    background: #fee;
    border: 1px dashed #d32f2f;
    border-radius: var(--cr-radius-input);
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-sizing: border-box;
}

.cr-opt-out-banner-icon {
    flex-shrink: 0;
    color: #d32f2f;
    font-size: 20px;
    margin-top: 2px;
}

.cr-opt-out-banner-body {
    flex: 1;
    min-width: 0;
}

.cr-opt-out-banner-title {
    font-family: var(--cr-font-family);
    font-weight: 500;
    color: var(--cr-color-text-strong);
    font-size: var(--cr-font-size-sm);
    margin-bottom: 4px;
    line-height: 1.3;
}

.cr-opt-out-banner-text {
    font-family: var(--cr-font-family);
    color: var(--cr-color-text-sub);
    font-size: 13px;
    line-height: 1.4;
}

.cr-opt-out-timestamp {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    font-style: italic;
    opacity: 0.85;
    color: var(--cr-color-text-sub);
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 2px 0 10px;
}


/* =============================================================
   CHAT CENTRAL — COMPOSE BOX US-4
   ============================================================= */

/* Compose wrapper */
.cr-compose {
    background: var(--cr-color-bg-weak);
    padding: 10px 48px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

/* Character counter row (above input) */
.cr-compose-counter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    font-weight: 500;
    color: var(--cr-color-text-sub);
    line-height: 16px;
}

.cr-segment-info-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cr-compose-counter i {
    font-size: 14px;
    color: var(--cr-color-text-soft);
    cursor: pointer;
}

.cr-segment-info-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 6px;
    background: var(--cr-color-text-strong, #1a1a1a);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Input container (white card with border) */
.cr-compose-input-container {
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-input);
    box-shadow: var(--cr-shadow-sm);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-right: 3px;
    min-height: 43px;
}

/* Textarea inside the container */
.cr-compose-textarea {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-strong);
    padding: 10px;
    resize: none;
    min-height: 43px;
    max-height: 200px;
    box-shadow: none;
    line-height: 20px;
}

.cr-compose-textarea::placeholder {
    color: var(--cr-color-text-soft);
}

.cr-compose-textarea:disabled {
    background-color: transparent;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Attachment button */
.cr-compose-attach-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--cr-radius-input);
    color: var(--cr-color-text-sub);
    font-size: 18px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.cr-compose-attach-btn:hover {
    background: var(--cr-color-bg-weak);
}

/* Send button */
.cr-compose-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    background: var(--cr-color-bg-weak);
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: var(--cr-color-text-soft);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    font-weight: 500;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.cr-compose-send-btn:not(:disabled) {
    background: var(--cr-color-primary);
    color: #fff;
}

.cr-compose-send-btn:hover:not(:disabled) {
    background: var(--cr-color-primary-hover);
}

.cr-compose-send-btn:disabled {
    cursor: not-allowed;
}

/* Action bar below input */
.cr-compose-actions {
    display: flex;
    align-items: center;
    margin-top: 6px;
}

.cr-compose-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--cr-color-bg-weak);
    border: none;
    cursor: pointer;
    border-radius: var(--cr-radius-input);
    color: var(--cr-color-text-sub);
    font-size: 18px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.cr-compose-action-btn:hover {
    background: var(--cr-color-primary-light);
}

/* Schedule button (right-aligned, has text label) */
.cr-compose-schedule-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    background: var(--cr-color-bg-weak);
    border: none;
    cursor: pointer;
    border-radius: var(--cr-radius-input);
    color: var(--cr-color-text-sub);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    font-weight: 500;
    flex-shrink: 0;
    transition: background 0.15s;
}

.cr-compose-schedule-btn:hover {
    background: var(--cr-color-primary-light);
}


/* =============================================================
   CHAT CENTRAL — HEADER & RIGHT PANEL US-2
   ============================================================= */

/* Conversation header */
.cr-chat-header {
    background: var(--cr-color-bg-white);
    padding: 14px 34px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--cr-color-border);
    flex-shrink: 0;
    position: relative;
}

/* 48px avatar in header */
.cr-chat-header-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--cr-radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cr-font-family);
    font-size: 18px;
    font-weight: 500;
    flex-shrink: 0;
    line-height: 1;
    position: relative;
}

/* Green online-status dot */
.cr-chat-header-status {
    position: absolute;
    bottom: 0;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1fc16b;
    border: 2px solid #fff;
}

/* Name + phone column */
.cr-chat-header-info {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cr-chat-header-name {
    font-family: var(--cr-font-family);
    font-size: 18px;
    font-weight: 500;
    color: var(--cr-color-text-strong);
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    text-decoration: none;
}

.cr-chat-header-name:hover {
    text-decoration: underline;
}

.cr-chat-header-phone {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-sub);
    line-height: 20px;
}

/* Info (ⓘ) button in header */
.cr-chat-header-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--cr-radius-btn);
    color: var(--cr-color-text-sub);
    font-size: 20px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.cr-chat-header-info-btn:hover {
    background: var(--cr-color-bg-weak);
}

/* New conversation "To:" input row */
.cr-new-chat-input {
    background: var(--cr-color-bg-white);
    padding: 14px 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--cr-color-border);
    flex-shrink: 0;
    position: relative;
}

/* Floating contact picker dropdown card */
.cr-contact-picker {
    position: absolute;
    top: calc(100% + 4px);
    left: 34px;
    width: 420px;
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-border);
    border-radius: 16px;
    box-shadow: 0px 16px 32px -12px rgba(14, 18, 27, 0.1);
    max-height: 372px;
    overflow-y: auto;
    z-index: 200;
    padding: 8px;
}

.cr-contact-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.cr-contact-picker-item:hover {
    background: var(--cr-color-bg-weak);
}

.cr-contact-picker-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--cr-radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cr-font-family);
    font-size: 16px;
    font-weight: 500;
    flex-shrink: 0;
    line-height: 1;
}

.cr-contact-picker-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cr-contact-picker-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.cr-contact-picker-name {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    font-weight: 500;
    color: var(--cr-color-text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.cr-contact-picker-phone {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    color: var(--cr-color-text-soft);
    white-space: nowrap;
    flex-shrink: 0;
}

.cr-contact-picker-address {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    color: var(--cr-color-text-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.cr-new-chat-input-label {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    font-weight: 500;
    color: var(--cr-color-text-sub);
    flex-shrink: 0;
}

.cr-new-chat-input-field {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-strong);
    background: transparent;
    min-width: 0;
    box-shadow: none;
}

.cr-new-chat-input-field::placeholder {
    color: var(--cr-color-text-soft);
}

/* Right panel: info button (collapsed state) */
.cr-chat-right-panel .cr-info-panel-toggle {
    margin: 16px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--cr-radius-input);
    color: var(--cr-color-primary);
    font-size: 20px;
    transition: background 0.15s;
}

.cr-chat-right-panel .cr-info-panel-toggle:hover {
    background: var(--cr-color-primary-light);
}

/* Right panel close button */
.cr-info-panel-close {
    position: absolute;
    top: 10px;
    right: 14px;
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cr-color-text-sub);
    font-size: 16px;
    padding: 4px;
    border-radius: var(--cr-radius-input);
}

.cr-chat-right-panel.expanded .cr-info-panel-close {
    display: flex;
}

/* Info panel content */
.cr-info-panel {
    overflow-y: auto;
    flex: 1;
}

.cr-info-panel-title {
    padding: 20px;
    font-family: var(--cr-font-family);
    font-size: 18px;
    font-weight: 500;
    color: var(--cr-color-text-strong);
    border-bottom: 1px solid var(--cr-color-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cr-info-panel-section-label {
    padding: 8px 20px 4px;
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    font-weight: 500;
    color: var(--cr-color-text-soft);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cr-info-panel-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--cr-color-border);
}

.cr-info-panel-field-label {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    font-weight: 500;
    color: var(--cr-color-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.cr-info-panel-field-value {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-sub);
    line-height: 20px;
    margin-bottom: 12px;
}

.cr-info-panel-field-value:last-child {
    margin-bottom: 0;
}

.cr-info-panel-account-name {
    font-family: var(--cr-font-family);
    font-size: 18px;
    font-weight: 500;
    color: var(--cr-color-text-strong);
    margin-bottom: 4px;
}

.cr-member-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-sub);
}

.cr-member-row i.fa-trash {
    display: none;
    margin-left: auto;
    color: var(--cr-color-error);
    cursor: pointer;
}

.cr-member-row:hover i.fa-trash {
    display: inline;
}


/* =============================================================
   REUSABLE LAYOUT COMPONENTS (Onboarding)
   ============================================================= */

/* Hide the global breadcrumb bar on redesigned onboarding pages */
.chat-home #content-header {
    display: none;
}

/* Hide the Durandal compose host div itself, not just its content */
.chat-home > [data-bind*="compose"] {
    display: none;
}

/* Establish height chain so onboarding pages fill available space */
.chat-home #inner_content {
    height: 100%;
    overflow-y: auto;
}

.chat-home .color-font-light {
    height: 100% !important;
}

/* Bridge height chain through Knockout if/ifnot wrapper divs */
.chat-home .color-font-light > [data-bind*="ifnot"],
.chat-home .color-font-light > [data-bind*="ifnot"] > [data-bind*="ifnot"] {
    height: 100%;
}

/* Outer scrollable container for all onboarding pages */
.cr-page-container {
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Page Wrapper - full-width flex column container for each page */
.cr-page-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    background: var(--cr-color-bg-white);
}

/* KO's if-binding empties inactive page wrappers; hide them from flex layout */
.cr-page-wrapper:empty {
    display: none;
    flex: none;
}

/* Page Header with title and bottom border */
.cr-page-header {
    background: var(--cr-color-bg-white);
    padding: 16px 32px;
    position: relative;
    flex-shrink: 0;
}

.cr-page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 32px;
    right: 32px;
    height: 1px;
    background-color: var(--cr-color-border);
}

.cr-page-title {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-lg);
    line-height: var(--cr-line-height-md);
    color: var(--cr-color-text-strong);
    letter-spacing: -0.27px;
}

.cr-page-subtitle {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-sub);
    letter-spacing: -0.084px;
    margin-top: 4px;
}

/* Content area: sidebar + main */
.cr-content {
    display: flex;
    flex: 1;
    gap: var(--cr-space-7);
    padding: var(--cr-space-6) var(--cr-space-8);
    overflow: hidden;
    min-height: 0;
}

/* Main content column */
.cr-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Section title within main content */
.cr-section-title {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-lg);
    line-height: var(--cr-line-height-md);
    color: var(--cr-color-text-strong);
    margin: 0 0 4px 0;
    letter-spacing: -0.27px;
}

.cr-section-subtitle {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-sub);
    letter-spacing: -0.084px;
    margin: 0 0 var(--cr-space-5) 0;
}

.cr-divider {
    height: 1px;
    background: var(--cr-color-border);
    margin-bottom: var(--cr-space-6);
}

/* Page Footer */
.cr-page-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: var(--cr-space-6) var(--cr-space-8);
    border-top: 1px solid var(--cr-color-border);
    background: var(--cr-color-bg-white);
    flex-shrink: 0;
}

.cr-page-footer-split {
    justify-content: space-between;
}


/* =============================================================
   BUTTONS
   ============================================================= */

.cr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--cr-space-1);
    padding: var(--cr-space-3) var(--cr-space-5);
    border-radius: var(--cr-radius-btn);
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    letter-spacing: -0.084px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.cr-btn i {
    font-size: 12px;
}

.cr-btn-primary {
    background: var(--cr-color-primary);
    color: var(--cr-color-bg-white);
}

.cr-btn-primary:hover {
    background: var(--cr-color-primary-hover);
    color: var(--cr-color-bg-white);
    text-decoration: none;
}

.cr-btn-primary:disabled {
    background: var(--cr-color-text-soft);
    cursor: not-allowed;
}

.cr-btn-outline {
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-border);
    color: var(--cr-color-text-sub);
    box-shadow: var(--cr-shadow-sm);
}

.cr-btn-outline:hover {
    background: var(--cr-color-bg-weak);
    color: var(--cr-color-text-sub);
    text-decoration: none;
}

.cr-btn-outline:disabled {
    cursor: not-allowed;
    background: var(--cr-color-bg-disabled);
    color: var(--cr-color-text-disabled);
    border-color: var(--cr-color-bg-disabled);
}

.cr-btn-full {
    width: 100%;
}

.cr-btn-lg {
    padding: var(--cr-space-4) var(--cr-space-6);
    font-size: var(--cr-font-size-sm);
}


/* =============================================================
   STEP INDICATOR SIDEBAR
   ============================================================= */

.cr-sidebar {
    width: 274px;
    min-width: 274px;
    background: var(--cr-color-bg-weak);
    border-radius: var(--cr-radius-card);
    padding: var(--cr-space-6) var(--cr-space-5) var(--cr-space-5) var(--cr-space-5);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.cr-sidebar-steps {
    display: flex;
    flex-direction: column;
    gap: var(--cr-space-2);
    flex: 1;
}

.cr-step-item {
    display: flex;
    align-items: center;
    gap: var(--cr-space-3);
    padding: var(--cr-space-2);
    border-radius: var(--cr-radius-btn);
    position: relative;
    transition: all 0.2s ease;
}

.cr-step-active {
    background: var(--cr-color-bg-white);
    box-shadow: var(--cr-shadow-sm);
}

.cr-step-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-xs);
    line-height: var(--cr-line-height-xs);
    background: var(--cr-color-bg-white);
    color: var(--cr-color-text-sub);
    box-shadow: var(--cr-shadow-sm);
    flex-shrink: 0;
}

.cr-step-circle-active {
    background: var(--cr-color-primary);
    color: var(--cr-color-bg-white);
    box-shadow: none;
}

.cr-step-circle-completed {
    background: var(--cr-color-success);
    color: var(--cr-color-bg-white);
    box-shadow: none;
}

.cr-step-check {
    font-size: 10px;
}

.cr-step-label {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-sub);
    letter-spacing: -0.084px;
    flex: 1;
}

.cr-step-active .cr-step-label {
    color: var(--cr-color-text-strong);
}

.cr-step-arrow {
    color: var(--cr-color-text-sub);
    font-size: 12px;
}

.cr-sidebar-help {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--cr-space-5);
}

.cr-sidebar-help-text {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-sub);
    text-align: center;
    margin: 0;
    letter-spacing: -0.084px;
}

.cr-sidebar-help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--cr-space-2);
    padding: var(--cr-space-3);
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-btn);
    box-shadow: var(--cr-shadow-sm);
    cursor: pointer;
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-sub);
    letter-spacing: -0.084px;
    transition: all 0.2s ease;
}

.cr-sidebar-help-btn:hover {
    background: var(--cr-color-bg-weak);
}

.cr-sidebar-help-btn i {
    font-size: 16px;
}


/* =============================================================
   FORM COMPONENTS
   ============================================================= */

.cr-form-group {
    margin-bottom: var(--cr-space-5);
}

.cr-form-row {
    display: flex;
    gap: var(--cr-space-5);
}

.cr-form-row > * {
    flex: 1;
    min-width: 0;
}

.cr-form-label {
    display: block;
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-strong);
    letter-spacing: -0.084px;
    margin-bottom: var(--cr-space-1);
}

.cr-form-label .cr-required {
    color: var(--cr-color-error);
    margin-left: 2px;
}

.cr-form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-input);
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-strong);
    background: var(--cr-color-bg-white);
    box-shadow: var(--cr-shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.cr-form-input::placeholder {
    color: var(--cr-color-text-soft);
}

.cr-form-input:focus {
    border-color: var(--cr-color-primary);
    box-shadow: 0 0 0 3px rgba(69, 121, 189, 0.12);
}

.cr-form-input:disabled {
    background: var(--cr-color-bg-weak);
    color: var(--cr-color-text-soft);
    cursor: not-allowed;
}

.cr-form-input.cr-invalid {
    border-color: var(--cr-color-error);
}

.cr-form-select {
    width: 100%;
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-input);
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-strong);
    background: var(--cr-color-bg-white);
    box-shadow: var(--cr-shadow-sm);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23525866' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    box-sizing: border-box;
    outline: none;
    height: auto;
    margin: 0;
}

.cr-form-select:focus {
    border-color: var(--cr-color-primary);
    box-shadow: 0 0 0 3px rgba(69, 121, 189, 0.12);
}

.cr-form-select.required.invalid {
    border-left: 1px solid var(--cr-color-border);
}

.cr-form-select:disabled {
    background: var(--cr-color-bg-weak);
    color: var(--cr-color-text-soft);
    cursor: not-allowed;
}

.cr-form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-input);
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-strong);
    background: var(--cr-color-bg-white);
    box-shadow: var(--cr-shadow-sm);
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}

.cr-form-textarea:focus {
    border-color: var(--cr-color-primary);
    box-shadow: 0 0 0 3px rgba(69, 121, 189, 0.12);
}

.cr-form-textarea:disabled {
    background: var(--cr-color-bg-weak);
    color: var(--cr-color-text-soft);
    cursor: not-allowed;
}

/* Char count for textarea */
.cr-form-charcount {
    text-align: right;
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    color: var(--cr-color-text-soft);
    margin-top: 2px;
}

/* Validation error message */
.cr-form-error {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-xs);
    line-height: var(--cr-line-height-xs);
    color: var(--cr-color-error);
    margin-top: var(--cr-space-1);
    display: flex;
    align-items: center;
    gap: var(--cr-space-1);
}

.cr-form-error i {
    font-size: 12px;
}

/* Form hint text */
.cr-form-hint {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    line-height: 1.5;
    color: var(--cr-color-text-sub);
    margin-top: 4px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.cr-form-hint i {
    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* URL prefix label (https://) */
.cr-form-input-with-prefix {
    display: flex;
    align-items: stretch;
}

.cr-form-input-prefix {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: var(--cr-color-bg-weak);
    border: 1px solid var(--cr-color-border);
    border-right: none;
    border-radius: var(--cr-radius-input) 0 0 var(--cr-radius-input);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-sub);
    white-space: nowrap;
}

.cr-form-input-with-prefix .cr-form-input {
    border-radius: 0 var(--cr-radius-input) var(--cr-radius-input) 0;
}

/* Pretty-select override for .cr- context */
.cr-form-group .btn.form-control[data-bind*="pretty-select"] {
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-input);
    box-shadow: var(--cr-shadow-sm);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    text-align: left;
    height: auto;
    padding: 8px 12px;
    background: var(--cr-color-bg-white);
}

.cr-form-group .btn.form-control.cr-select-invalid {
    border-left: 4px solid red;
}


/* =============================================================
   INFO BOX / CALLOUT
   ============================================================= */

.cr-info-box {
    padding: var(--cr-space-4) 14px;
    border-radius: var(--cr-radius-input);
    background-color: var(--cr-color-bg-weak);
    border: 1px solid var(--cr-color-border);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: var(--cr-space-5);
}

.cr-info-box-icon {
    background-color: var(--cr-color-info-bg);
    border-radius: var(--cr-radius-input);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cr-info-box-icon i {
    color: var(--cr-color-info-icon);
    font-size: 18px;
}

.cr-info-box-text {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    line-height: 1.5;
    color: var(--cr-color-text-sub);
}

/* Small hint box (e.g., phone number tip) */
.cr-hint-box {
    margin-top: 6px;
    padding: var(--cr-space-2) var(--cr-space-4);
    border-radius: var(--cr-radius-input);
    background-color: var(--cr-color-info-soft-bg);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-xs);
    line-height: 1.5;
    color: var(--cr-color-text-sub);
}


/* =============================================================
   VALIDATION STATUS PANELS
   ============================================================= */

.cr-validation-warning {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: var(--cr-color-warning-bg);
    border: 1px solid var(--cr-color-warning-border);
    border-radius: var(--cr-radius-input);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-sub);
}

.cr-validation-warning i {
    color: #f59e0b;
    margin-right: 4px;
}

.cr-validation-success {
    color: var(--cr-color-success);
    display: flex;
    align-items: center;
    gap: var(--cr-space-2);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    margin-bottom: 8px;
}

.cr-validation-error {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-error);
    border-radius: var(--cr-radius-input);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
}

.cr-validation-error .color-font-danger {
    color: var(--cr-color-error);
}

.cr-validation-actions {
    margin-top: 8px;
}


/* =============================================================
   BADGE
   ============================================================= */

.cr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px var(--cr-space-2);
    border-radius: var(--cr-radius-pill);
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-xs);
    line-height: var(--cr-line-height-xs);
    width: fit-content;
}

.cr-badge-yellow {
    background: var(--cr-color-badge-yellow-bg);
    color: var(--cr-color-badge-yellow-text);
}

.cr-badge-gray {
    background: var(--cr-color-badge-gray-bg);
    color: var(--cr-color-badge-gray-text);
}

.cr-badge-coming-soon {
    background: var(--cr-color-badge-coming-soon-bg);
    color: var(--cr-color-badge-coming-soon-text);
}


/* =============================================================
   CARD
   ============================================================= */

.cr-card {
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-card);
    box-shadow: var(--cr-shadow-md);
    overflow: hidden;
}


/* =============================================================
   SCROLLBAR
   ============================================================= */

.cr-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.cr-scrollbar::-webkit-scrollbar-track {
    background: var(--cr-color-bg-weak);
}

.cr-scrollbar::-webkit-scrollbar-thumb {
    background: var(--cr-color-border-dark);
    border-radius: 4px;
}

.cr-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--cr-color-text-soft);
}


/* =============================================================
   PAGE-SPECIFIC: PHONE NUMBER SELECTION (Page 5)
   ============================================================= */

.cr-phone-illustration {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 0 auto var(--cr-space-6) auto;
}

.cr-option-card {
    display: flex;
    align-items: center;
    padding: var(--cr-space-6);
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-card);
    background: var(--cr-color-bg-white);
    margin-bottom: var(--cr-space-5);
    gap: 18px;
}

.cr-option-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--cr-color-bg-weak);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cr-option-card-icon i {
    font-size: 22px;
    color: var(--cr-color-primary);
}

.cr-option-card-content {
    flex: 1;
    min-width: 0;
}

.cr-option-card-title {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: 17px;
    line-height: var(--cr-line-height-md);
    color: var(--cr-color-text-strong);
    margin-bottom: var(--cr-space-1);
}

.cr-option-card-title i {
    font-size: 14px;
    color: var(--cr-color-text-soft);
    margin-left: 4px;
    cursor: help;
}

.cr-option-card-description {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    line-height: 1.5;
    color: var(--cr-color-text-sub);
}

.cr-option-card-action {
    flex-shrink: 0;
}

/* Local numbers list */
.cr-local-numbers {
    margin-top: var(--cr-space-4);
    display: flex;
    flex-flow: column wrap;
    max-height: 60px;
    gap: 4px;
}

.cr-local-numbers .btn-link {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-primary);
}

.cr-no-numbers {
    margin-top: var(--cr-space-4);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    color: var(--cr-color-text-sub);
}

.cr-no-numbers i {
    color: var(--cr-color-primary);
    margin-right: 4px;
}


/* =============================================================
   PAGE-SPECIFIC: APPLICATION SUBMITTED/STATUS (Page 6)
   ============================================================= */

.cr-status-card {
    width: 620px;
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-border);
    border-radius: 12px;
    box-shadow: var(--cr-shadow-sm);
    overflow: hidden;
}

.cr-status-card-header {
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.16) 100%), linear-gradient(90deg, #4579bd 0%, #4579bd 100%);
    padding: var(--cr-space-6);
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

/* Decorative circles in header */
.cr-status-card-header::before {
    content: '';
    position: absolute;
    width: 357px;
    height: 357px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    top: -51px;
    left: -57px;
}

.cr-status-card-header::after {
    content: '';
    position: absolute;
    width: 205px;
    height: 357px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    top: -10px;
    right: -50px;
}

.cr-status-card-checkmark {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(245, 247, 250, 0.32) 0%, rgba(192, 213, 255, 0.09) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -36px auto 0;
    position: relative;
    z-index: 1;
}

.cr-status-card-checkmark-inner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-border);
    box-shadow: var(--cr-shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cr-status-card-checkmark-inner i {
    font-size: 24px;
    color: var(--cr-color-success);
}

.cr-status-card-body {
    padding: var(--cr-space-6) var(--cr-space-7) var(--cr-space-7);
    text-align: center;
}

.cr-status-card-body .cr-section-title {
    font-family: var(--cr-font-family-display);
    font-size: var(--cr-font-size-2xl);
    line-height: var(--cr-line-height-xl);
    text-align: center;
    margin-bottom: var(--cr-space-2);
}

.cr-status-card-body .cr-section-subtitle {
    text-align: center;
    margin-bottom: 0;
}

.cr-status-card-body p {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-sub);
    text-align: center;
    letter-spacing: -0.084px;
}

.cr-status-card-actions {
    margin-top: var(--cr-space-5);
}


/* =============================================================
   UTILITY: Download/info link within compliance section
   ============================================================= */

.cr-compliance-info {
    margin-top: 14px;
    padding: 8px 12px;
    border-radius: var(--cr-radius-input);
    background: var(--cr-color-bg-weak);
    border: 1px solid var(--cr-color-border);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    line-height: 1.5;
    color: var(--cr-color-text-sub);
}

.cr-compliance-info i.fa-regular {
    color: var(--cr-color-primary);
    margin-top: 3px;
}

.cr-compliance-info .btn-link {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
}


/* =============================================================
   PAGE-SPECIFIC: DOCUMENT SIGNER (Page 1)
   ============================================================= */

/* PandaDoc form/iframe container */
.cr-doc-form-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cr-doc-iframe-container {
    flex: 1;
    min-height: 300px;
}

.cr-doc-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Document signed completion state */
.cr-doc-complete {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}

.cr-doc-complete-content {
    text-align: center;
}

.cr-doc-complete-icon {
    font-size: 48px;
    color: var(--cr-color-success);
    margin-bottom: var(--cr-space-5);
}

.cr-doc-complete-title {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-lg);
    line-height: var(--cr-line-height-md);
    color: var(--cr-color-text-strong);
    margin: 0 0 var(--cr-space-2) 0;
}

.cr-doc-complete-subtitle {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-sub);
    margin: 0;
}


/* =============================================================
   PACKAGE SELECTION / PRICING CARDS (Page 0)
   ============================================================= */

/* Content area variant: centered cards on gray bg, no sidebar */
.cr-content-centered {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--cr-space-6) var(--cr-space-7);
    flex: 1;
    background-color: var(--cr-color-bg-weak);
}

/* Pricing cards row */
.cr-pricing-cards {
    display: flex;
    gap: var(--cr-space-8);
    align-items: flex-start;
    justify-content: center;
}

/* Card width modifiers */
.cr-card-essentials {
    width: 420px;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--cr-space-5);
}

.cr-card-amplified {
    width: 430px;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--cr-space-5);
}

/* Card Header (gray outer section with rounded bottom) */
.cr-card-header {
    background: var(--cr-color-bg-gray);
    border: 1px solid var(--cr-color-border);
    border-top: none;
    border-radius: 0 0 20px 20px;
    padding: var(--cr-space-5);
    display: flex;
    flex-direction: column;
    gap: var(--cr-space-5);
    box-shadow: var(--cr-shadow-card-header);
}

/* Inner Box (colored box inside card header) */
.cr-card-inner-box {
    border-radius: var(--cr-radius-btn);
    padding: var(--cr-space-5);
    position: relative;
    overflow: hidden;
}

.cr-card-inner-box-blue {
    background: linear-gradient(180deg, var(--cr-color-pricing-blue-start) 0%, var(--cr-color-pricing-blue-end) 100%);
    border: 1px solid var(--cr-color-border);
}

.cr-card-inner-box-gray {
    background: var(--cr-color-bg-disabled);
    border: 1px solid var(--cr-color-border);
}

/* Badge z-index inside inner box (stack above dot pattern) */
.cr-card-inner-box .cr-badge {
    position: relative;
    z-index: 1;
}

/* Decorative geometric pattern */
.cr-card-dot-pattern {
    position: absolute;
    top: 2px;
    right: -60px;
    width: 193px;
    height: 147px;
    opacity: 0.2;
    pointer-events: none;
    overflow: visible;
}

/* Pricing display */
.cr-pricing {
    display: flex;
    align-items: baseline;
    margin-top: var(--cr-space-3);
    position: relative;
    z-index: 1;
}

.cr-pricing-amount {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-3xl);
    line-height: var(--cr-line-height-2xl);
    color: var(--cr-color-bg-white);
    letter-spacing: -0.16px;
}

.cr-pricing-period {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-lg);
    line-height: var(--cr-line-height-md);
    color: var(--cr-color-bg-white);
    letter-spacing: -0.27px;
}

.cr-pricing-dark .cr-pricing-amount,
.cr-pricing-dark .cr-pricing-period {
    color: var(--cr-color-text-strong);
}

/* Tagline text below price */
.cr-card-tagline {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-xs);
    line-height: var(--cr-line-height-xs);
    color: var(--cr-color-text-strong);
    margin: 0;
}

/* Button z-index inside card header (stack above dot pattern) */
.cr-card-header .cr-btn {
    position: relative;
    z-index: 2;
}

/* Feature list */
.cr-feature-list {
    padding: var(--cr-space-5);
    display: flex;
    flex-direction: column;
    gap: var(--cr-space-3);
}

.cr-feature-item {
    display: flex;
    align-items: center;
    gap: var(--cr-space-2);
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    letter-spacing: -0.084px;
}

.cr-feature-item-active {
    color: var(--cr-color-text-strong);
}

.cr-feature-item-disabled {
    color: var(--cr-color-text-sub);
}

.cr-feature-check {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

.cr-feature-check-green {
    color: var(--cr-color-success);
}

.cr-feature-check-gray {
    color: var(--cr-color-text-sub);
}

/* Error message */
.cr-error-message {
    text-align: center;
    padding: var(--cr-space-6);
    color: var(--cr-color-error);
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
}


/* =============================================================
   PRIVACY POLICY PAGE (Page 2)
   ============================================================= */

.cr-policy-intro {
    display: flex;
    flex-direction: column;
    gap: var(--cr-space-5);
}

.cr-policy-illustration {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 194px;
    position: relative;
}

.cr-policy-illustration-image {
    width: 336px;
    height: 177px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cr-policy-illustration-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cr-policy-illustration-divider {
    width: 457px;
    height: 1px;
    background: var(--cr-color-border-dark);
    margin-top: 17px;
}

.cr-policy-intro-text {
    padding: var(--cr-space-3) 0 var(--cr-space-6) 0;
    display: flex;
    flex-direction: column;
    gap: var(--cr-space-1);
    align-items: center;
    text-align: center;
    width: 100%;
}

.cr-policy-title {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-lg);
    line-height: var(--cr-line-height-md);
    color: var(--cr-color-text-strong);
    letter-spacing: -0.27px;
    margin: 0;
}

.cr-policy-subtitle {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-sub);
    letter-spacing: -0.084px;
    margin: 0;
    max-width: 100%;
}

.cr-policy-subtitle p {
    margin: 0;
}

.cr-policy-intro-text .cr-policy-subtitle {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cr-policy-email-card {
    background: var(--cr-color-bg-white);
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-input);
    padding: var(--cr-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--cr-space-4);
    flex: 1;
    min-height: 0;
}

.cr-policy-email-header {
    display: flex;
    gap: var(--cr-space-1);
    align-items: center;
}

.cr-policy-email-icon {
    width: 20px;
    height: 20px;
    color: var(--cr-color-text-sub);
}

.cr-policy-email-title {
    flex: 1;
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-strong);
    letter-spacing: -0.084px;
}

.cr-policy-copy-btn {
    background: var(--cr-color-primary-light);
    border: none;
    border-radius: var(--cr-radius-input);
    padding: var(--cr-space-2);
    display: flex;
    gap: var(--cr-space-1);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cr-policy-copy-btn:hover {
    background: var(--cr-color-primary-light-hover);
}

.cr-policy-copy-btn i {
    width: 20px;
    height: 20px;
    color: var(--cr-color-primary);
}

.cr-policy-copy-btn span {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-primary);
    letter-spacing: -0.084px;
    padding: 0 var(--cr-space-1);
}

.cr-policy-email-content {
    background: var(--cr-color-bg-weak);
    border: 1px solid var(--cr-color-border);
    border-radius: 4px;
    padding: var(--cr-space-2) var(--cr-space-5);
    flex: 1;
    min-height: 150px;
    overflow-y: auto;
    overflow-x: hidden;
}

.cr-policy-email-content::-webkit-scrollbar {
    width: 8px;
}

.cr-policy-email-content::-webkit-scrollbar-track {
    background: var(--cr-color-bg-weak);
}

.cr-policy-email-content::-webkit-scrollbar-thumb {
    background: var(--cr-color-border-dark);
    border-radius: 4px;
}

.cr-policy-email-content::-webkit-scrollbar-thumb:hover {
    background: var(--cr-color-text-soft);
}

.cr-policy-email-text {
    font-family: var(--cr-font-family);
    font-weight: var(--cr-font-weight-regular);
    font-size: var(--cr-font-size-sm);
    line-height: var(--cr-line-height-sm);
    color: var(--cr-color-text-sub);
    letter-spacing: -0.084px;
}

.cr-policy-email-text h3 {
    font-family: var(--cr-font-family-display);
    font-weight: var(--cr-font-weight-medium);
    font-size: var(--cr-font-size-xl);
    line-height: var(--cr-line-height-lg);
    color: var(--cr-color-text-sub);
    margin: var(--cr-space-5) 0 var(--cr-space-2) 0;
}

.cr-policy-email-text p {
    margin: 0 0 var(--cr-space-1) 0;
}

.cr-policy-email-text ul {
    margin: var(--cr-space-1) 0;
    padding-left: 21px;
}

.cr-policy-email-text li {
    margin-bottom: 0;
}


/* =============================================================
   CHAT CENTRAL — Legacy styles (migrated from inline <style>)
   These will be progressively replaced by .cr-* classes in US-1–4.
   ============================================================= */

.cr-chat-central .durandal-wrapper {
    width: 100%;
}

/* Height chain for Chat Central page */
.chat-central {
    display: flex;
    flex-direction: column;
}

.chat-central #inner_content {
    flex: 1;
    overflow: hidden;
}

#page-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

#recipients-container {
    width: 260px;
    border-right: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

#recipients-container .recipient-search {
    padding: 10px;
}

#recipients-container .recipient-search input {
    width: calc(100% - 20px);
    border: 1px solid #999;
}

#recipients-container #btn-new-conversation {
    margin: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#recipients-container #recipients-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
}

#recipients-container #recipients-list .recipient {
    padding: 10px;
    margin: 2px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

#recipients-container #recipients-list .recipient:hover {
    background: #e3eefd;
    box-shadow: 0 2px 6px rgba(69, 121, 189, 0.08);
}

#recipients-container #recipients-list .recipient .recipient-account-name {
    display: flex;
    align-items: center;
    position: relative;
}

#recipients-container #recipients-list .recipient .recipient-account-name .unread-count {
    margin-left: auto;
    min-width: 24px;
    text-align: center;
    background-color: #9a2525;
    color: #fff;
    font-weight: bold;
    border-radius: 15px;
}

#recipients-container #recipients-list .recipient i {
    margin-right: 5px;
    font-size: 2em;
    vertical-align: middle;
}

#recipients-container #recipients-list .recipient span {
    vertical-align: middle;
}

#recipients-container #recipients-list .selected {
    background-color: #EAF0F7;
    box-shadow: 0 2px 8px rgba(69, 121, 189, 0.12);
}

#recipients-container #recipients-list .selected:hover {
    background-color: #EAF0F7;
    cursor: default;
}


#conversation-container #new-recipient-search-container {
    display: flex;
    height: 40px;
    margin-bottom: 10px;
}

#conversation-container #new-recipient-search-container #txt-new-recipient-name {
    display: flex;
    flex: 1;
    margin-right: 5px;
    max-width: 500px;
}

.cr-new-chat-phone-select {
    font-family: var(--cr-font-family);
    font-size: var(--cr-font-size-sm);
    height: 36px;
    width: 260px;
    flex-shrink: 0;
    padding: 6px 32px 6px 10px;
    border: 1px solid var(--cr-color-border);
    border-radius: var(--cr-radius-input);
    background: var(--cr-color-bg-white);
    box-shadow: var(--cr-shadow-sm);
    color: var(--cr-color-text-strong);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23525866' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

.cr-new-chat-phone-select:focus {
    border-color: var(--cr-color-primary);
    box-shadow: 0 0 0 3px rgba(69, 121, 189, 0.12);
    outline: none;
}



#conversation-container #messages-list .message-image-list {
    width: 100%;
}

#conversation-container #messages-list .message-image-list .message-image-container {
    float: right;
    padding: 10px;
    margin: 5px;
    border: 1px solid #666;
    background-color: #fff;
    border-radius: 2px;
}

#conversation-container #messages-list .message-image-list.reply .message-image-container {
    float: left;
}

#conversation-container #messages-list .message-image-list .message-image-container img {
    height: 200px;
}

#conversation-container #messages-list .user {
    align-self: flex-end;
    font-size: 0.85em;
    margin-top: 2px;
    margin-bottom: 10px;
    font-style: italic;
    opacity: 0.85;
}

#conversation-container #messages-list .user.reply {
    align-self: flex-start;
    border-left: 3px solid #b3c6e2;
    padding-left: 8px;
    border-radius: 0 6px 6px 0;
}

#conversation-container #messages-list .message {
    padding: 10px;
    margin: 10px;
    max-width: 400px;
    align-self: flex-start;
    border-radius: 5px;
}

#conversation-container #messages-list .message.sent {
    right: 0px;
    align-self: flex-end;
}

#conversation-container #messages-list .message.reply {
    border: 1px solid #b3c6e2;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(69, 121, 189, 0.06);
}

#conversation-container #messages-list .message > div {
    word-break: break-all;
    overflow-wrap: anywhere;
}

#upload-preview-list .img-upload-preview-container {
    border: 1px solid #666;
    border-radius: 5px;
    float: left;
    background-color: #fff;
    margin: 5px;
    position: relative;
}

#upload-preview-list .img-upload-preview-container .remove-preview {
    position: absolute;
    top: 1px;
    right: -5px;
    opacity: 0;
    border: none;
    background: none;
}

#upload-preview-list .img-upload-preview-container .remove-preview i {
    background-color: #fff;
    border-radius: 10px;
    font-size: 1.5em;
}

#upload-preview-list .img-upload-preview-container:hover .remove-preview {
    opacity: 1;
    border-radius: 5px;
}

#upload-preview-list .img-upload-preview-container .img-upload-preview {
    height: 120px;
    max-width: 300px;
    margin: 10px;
}


#side-panel {
    position: relative;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    display: flex;
    flex: 1;
    flex-direction: column;
    max-width: 60px;
    border-left: 1px solid #eee;
    justify-content: flex-start;
    transition-duration: 250ms;
}

#side-panel i.info-button {
    margin: 10px auto 0 auto;
    color: #4579BD;
    font-size: 18pt;
    cursor: pointer;
}

#side-panel i.panel-close {
    display: none;
}

#side-panel.expanded {
    transition-duration: 250ms;
    max-width: 400px;
}

#side-panel.expanded i.panel-close {
    display: initial;
    font-size: 14pt;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}

#side-panel.expanded #account-info {
    width: 400px;
    overflow-y: auto;
}

#side-panel.expanded #account-info .info-title {
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
}

#side-panel.expanded #account-info .info-title i {
    margin-right: 10px;
}

#side-panel.expanded #account-info .info-section-title {
    padding: 4px 20px;
    font-size: 13px;
    color: #aaa;
}

#side-panel.expanded #account-info div.section {
    padding: 20px;
}

#side-panel.expanded #account-info div.section .info-label {
    color: #ccc;
}

#side-panel.expanded #account-info div.section-account-name {
    padding: 20px;
    height: 100px;
}

#side-panel.expanded #account-info div.section-account-name div {
    margin: 10px 0;
}

#side-panel.expanded #account-info div.section-account-name div div {
    margin: 0;
}

#side-panel.expanded #account-info div.section-account-name #account-image {
    float: right;
    height: 100px;
    width: 100px;
    margin-top: -20px;
    margin-right: -20px;
}

#side-panel.expanded #account-info div.section-account-name #account-name {
    float: left;
    font-size: 22px;
    vertical-align: middle;
    margin-top: 12px;
}

div.member i.fa-trash {
    display: none;
}

div.member:hover i.fa-trash {
    display: initial;
    cursor: pointer;
}

#side-panel #templates {
    padding: 10px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #888 #F5F5F6;
}

#side-panel #templates .template {
    padding: 10px;
    margin: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

#side-panel #templates .template:hover {
    border: 1px solid #666;
}

#scheduled-chats {
    padding: 10px;
    overflow: auto;
}

#scheduled-chats .template {
    padding: 10px;
    margin: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#scheduled-chats .template:hover {
    border: 1px solid #666;
}

.template.disabled {
    pointer-events: none;
    opacity: 0.9;
    cursor: not-allowed;
}

#txt-new-message.disabled-input {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

#txt-new-message:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.opt-out-warning {
    background-color: #fee;
    border: 1px dashed #d32f2f;
    border-radius: 4px;
    max-width: 100%;
}

.opt-out-warning i.fa-exclamation-triangle {
    color: #d32f2f;
}

.opt-out-warning i.fa-check {
    color: #4caf50;
}
