/* Guest auth: fixed top bar + offset for main content */
.guest-auth-pages {
    padding-top: 4.75rem;
}

/* Guest auth: web parity (logo + locale bar) */
.guest-auth-topbar .logo {
    display: inline-block;
    width: 120px;
    color: #161c2d !important;
}
.guest-auth-topbar .logo img {
    max-width: 100%;
}
.guest-auth-topbar .logo .logo-dark-mode {
    display: none;
}
.guest-auth-topbar .logo .logo-light-mode {
    display: inline-block;
}

/* Register: plan picker (card grid + btn-check) */
.register-plan-grid {
    --register-plan-radius: 0.65rem;
}

.register-plan-card {
    cursor: pointer;
    display: block;
    margin-bottom: 0;
    border-radius: var(--register-plan-radius) !important;
    border: 2px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08)) !important;
    background: var(--bs-body-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.register-plan-card:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.45) !important;
    box-shadow: 0 0.35rem 1.1rem rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
}

.btn-check:checked + .register-plan-card {
    border-color: var(--bs-primary) !important;
    background: rgba(var(--bs-primary-rgb), 0.07);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.18);
}

.btn-check:checked + .register-plan-card .register-plan-hint {
    display: none !important;
}

.btn-check:checked + .register-plan-card .register-plan-picked {
    display: flex !important;
}

.btn-check:focus-visible + .register-plan-card {
    outline: 2px solid var(--bs-primary);
    outline-offset: 3px;
}

.is-invalid-plan-group .register-plan-card {
    border-color: var(--bs-danger) !important;
}

.register-form .form-control,
.register-form .form-select {
    border-radius: var(--register-plan-radius);
}

.register-form textarea.form-control {
    min-height: 5.5rem;
}

/* Authenticated dashboard: header logo (web brand assets) */
#page-topbar .navbar-brand-box .logo img {
    max-height: 60px;
    width: auto;
}

#page-topbar .header-profile-user {
    object-fit: cover;
}

/* Inbox: sidebar + chat share the same fixed height; messages/list scroll inside SimpleBar */
.beoncall-inbox {
    --beoncall-inbox-col-h: min(32rem, 65vh);
}

@media (min-width: 992px) {
    .beoncall-inbox {
        --beoncall-inbox-col-h: calc(100vh - 15rem);
    }
}

.beoncall-inbox-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 992px) {
    .beoncall-inbox-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

.beoncall-inbox-sidebar,
.beoncall-inbox-chat {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: var(--beoncall-inbox-col-h);
    max-height: var(--beoncall-inbox-col-h);
}

@media (min-width: 992px) {
    .beoncall-inbox-sidebar {
        width: 22rem;
        max-width: 100%;
        flex-shrink: 0;
    }

    .beoncall-inbox-chat {
        flex: 1 1 0;
        min-width: 0;
    }
}

.beoncall-inbox-layout .beoncall-inbox-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    margin-bottom: 0;
}

.beoncall-inbox-panel .card-header {
    flex-shrink: 0;
}

.beoncall-inbox-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.beoncall-inbox-scroll {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    height: 100%;
    max-height: 100%;
}

.beoncall-inbox-scroll .simplebar-wrapper {
    height: 100%;
    max-height: 100%;
}

.beoncall-inbox-scroll .simplebar-mask {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.beoncall-inbox-scroll .simplebar-content-wrapper {
    outline: none;
}

.beoncall-inbox-thread-list .chat-list li a {
    padding: 0.85rem 1rem;
}

.beoncall-inbox-thread-list .chat-list li.active a {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
}

/* Inbox sidebar: combined search + filter (pill bar, primary accent border) */
.beoncall-inbox-toolbar {
    background: var(--bs-body-bg);
}

.beoncall-inbox-search-form {
    margin: 0;
}

.beoncall-inbox-search-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.5rem;
    padding: 0.2rem 0.35rem 0.2rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.42);
    background: rgba(var(--bs-secondary-rgb), 0.07);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.beoncall-inbox-search-bar:focus-within {
    border-color: rgba(var(--bs-primary-rgb), 0.75);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.12);
}

.beoncall-inbox-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.beoncall-inbox-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    font-size: 0.875rem;
    padding: 0.35rem 0.25rem;
    color: var(--bs-body-color);
    outline: none;
    box-shadow: none;
}

.beoncall-inbox-search-input::placeholder {
    color: var(--bs-secondary-color);
    opacity: 0.85;
}

.beoncall-inbox-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--bs-primary);
    font-size: 1.15rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.beoncall-inbox-filter-trigger:hover {
    background: rgba(var(--bs-primary-rgb), 0.18);
    color: var(--bs-primary);
}

.beoncall-inbox-filter-trigger:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.beoncall-inbox-filter-menu {
    min-width: 13.5rem;
    border-radius: 0.65rem !important;
    margin-top: 0.35rem !important;
}

.beoncall-inbox-filter-item {
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.beoncall-inbox-filter-item:active {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
}

.beoncall-inbox-chat-header .visitor-id-full {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.beoncall-inbox-thread-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.28em 0.55em;
    letter-spacing: 0.02em;
}

.beoncall-inbox-header-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    letter-spacing: 0.02em;
}

/* Chat header: ⋯ menu (set conversation status) */
.beoncall-inbox-chat-more-btn {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #4b5563;
    background-color: #eef0f4;
    border: none;
    border-radius: 50%;
    box-shadow: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.beoncall-inbox-chat-more-btn:hover {
    background-color: #e4e7ee;
    color: #1f2937;
}

.beoncall-inbox-chat-more-btn:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.beoncall-inbox-chat-more-menu {
    min-width: 14rem;
    border-radius: 0.5rem !important;
}

.beoncall-inbox-status-option {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    width: 100%;
    text-align: inherit;
}

.beoncall-inbox-status-option:disabled {
    opacity: 0.55;
    cursor: default;
}

.beoncall-inbox-composer {
    flex-shrink: 0;
    background: var(--bs-body-bg);
}

.beoncall-inbox-empty {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 12rem;
}

/* Inbox messages: bubble first, then sender · role · relative time (full datetime on hover via title) */
.beoncall-inbox .beoncall-inbox-msg {
    max-width: min(100%, 34rem);
}

.beoncall-inbox .beoncall-inbox-msg-bubble .beoncall-inbox-msg-text {
    word-break: break-word;
}

/* Bubbles aligned with chat widget: yours (agent/AI) = blue; visitor = gray */
.beoncall-inbox .chat-conversation li.right .beoncall-inbox-msg .ctext-wrap {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
}

.beoncall-inbox .chat-conversation li:not(.right) .beoncall-inbox-msg .ctext-wrap {
    background-color: #f3f4f6;
    color: #111827;
    border: 1px solid rgba(20, 20, 30, 0.12);
}

.beoncall-inbox .beoncall-inbox-msg-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.4rem;
    row-gap: 0.15rem;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    line-height: 1.35;
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.beoncall-inbox .chat-conversation li:not(.right) .beoncall-inbox-msg-meta {
    justify-content: flex-end;
}

.beoncall-inbox .chat-conversation li.right .beoncall-inbox-msg-meta {
    justify-content: flex-start;
}

.beoncall-inbox .beoncall-inbox-msg-meta-sep {
    opacity: 0.55;
    user-select: none;
}

.beoncall-inbox .beoncall-inbox-msg-time {
    cursor: help;
    white-space: nowrap;
    border-bottom: 1px dotted transparent;
}

.beoncall-inbox .beoncall-inbox-msg-time:hover {
    border-bottom-color: rgba(var(--bs-secondary-rgb), 0.45);
}

.beoncall-inbox .beoncall-inbox-msg-status {
    letter-spacing: 0.02em;
    opacity: 0.85;
}

/* Dashboard: chat widget embed snippet */
.beoncall-widget-setup .beoncall-widget-snippet-ta {
    font-size: 1rem;
    line-height: 1.5;
}

/* Dashboard billing: match body text size (theme often shrinks card copy) */
.beoncall-billing {
    font-size: 1rem;
}

.beoncall-billing .card-body {
    font-size: 1rem;
}

.beoncall-billing .beoncall-billing-plan-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.beoncall-billing .beoncall-billing-plan-card:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.35) !important;
    box-shadow: 0 0.35rem 1.1rem rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
}
