:root {
    --bs-primary: #3EB1FF;
    --bs-primary-rgb: 62, 177, 255;
    --bs-primary-bg-subtle: color-mix(in sRGB, var(--bs-paper-bg) 84%, #3EB1FF);
    --bs-primary-border-subtle: rgba(62, 177, 255, 0.3);
    --bs-primary-contrast: #fff
}

#debug-bar h1 {
    line-height: 36px;
}

.cf-turnstile-container {
    max-width: 99%;
}

.flag {
    border-radius: 2px;
}

.legend-item img.flag {
    width: 24px;
    height: auto;
}

#overview table img.flag {
    width: 24px;
    height: auto;
    vertical-align: sub;
}

.footer-left .footer-link {
    margin-bottom: 4px;
}

.footer-left {
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

footer:hover .footer-left {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.footer-left .footer-link img, .footer-left .flag {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.footer-link .dropdown-item i {
    vertical-align: middle;
    margin-bottom: 3px;
}

footer:hover .footer-link img, footer:hover .flag {
    filter: none;
    opacity: 1;
    transition: filter 0.5s ease;
}

.dropdown-language .dropdown-menu i.bx {
    vertical-align: top;
    font-size: 20px;
}

.credits-indicator {
	font-weight: 500;
	color: var(--bs-body-color) !important;
}

.credits-indicator .credits-text {
	font-size: 0.875rem;
	white-space: nowrap;
}

.credits-dropdown {
	min-width: 260px;
}

.form-control.form-control-lg:focus, .form-control.form-control-lg:active, .form-control.form-control-lg.is-invalid {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

#activeCompetitorsTable .external-url i.bx {
    margin-top: 5px;
}

.card .card-body .avatar {
    cursor: auto;
}

.card-min-height .text-body {
    min-height: 41px;
}

/* Spinning hourglass animation for processing step */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bs-stepper .step.active[data-target="#processing-step"] .bxs-hourglass {
    animation: spin 2s linear infinite;
}

/* Competitor suggestion styling with checkbox button group */
.competitor-item {
    display: flex;
    border: 1px solid #d9dee3;
    border-radius: 0.375rem;
    overflow: hidden;
    transition: all 0.2s;
}

.competitor-item:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.competitor-item input[type="checkbox"] {
    margin: 0;
    padding: 0;
}

.competitor-item .form-check {
    padding: 1.40rem 0.75rem;
    margin: 0;
    border-right: 1px solid #d9dee3;
    background: #f8f9fa;
    transition: background 0.2s;
}

.competitor-item input[type="checkbox"]:checked ~ .form-check {
    background: var(--bs-primary-bg-subtle);
}

.competitor-item .competitor-content {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.competitor-item .competitor-link {
    padding: 0.75rem;
    border-left: 1px solid #d9dee3;
    color: #697a8d;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.competitor-item .competitor-link:hover {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.bs-stepper.vertical .bs-stepper-header {
    min-inline-size: 21rem !important;
}

#domainsTable .favicon img, #topicsTable .favicon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    background-color: #fff;
}

.menu-link .favicon img {
    background-color: #fff;
}

table .favicon img.rounded-circle {
    background-color: #fff;
}

.menu-sub .menu-link .favicon img {
    border: 2px solid var(--bs-avatar-group-border);
    object-fit: contain;
    background-color: #fff;
}

.copyright {
    font-size: 12px;
}

th i.bx {
    vertical-align: middle;
    margin-bottom: 3px;
}

/* Badge borders in colored table rows */
tr.table-success .bg-label-success {
    border: 1px solid var(--bs-success);
}

tr.table-warning .bg-label-warning {
    border: 1px solid var(--bs-warning);
}

/* Fix text color in table-success/table-warning rows */
tr.table-success td,
tr.table-warning td {
    color: #646e78;
}

.tab-content.tab-no-bg {
    background: none;
    border: none;
    box-shadow: none;
}

/* DataTables search input active state */
.dt-search .form-control:focus,
.dt-search .form-control:not(:placeholder-shown) {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(62, 177, 255, 0.1);
}

/* Topic Answer Content Styling - Textarea Block Style */
.topic-answer-content {
    font-size: 15px;
    line-height: 1.8;
    color: #566a7f;
    background-color: #f8f9fa;
    border: 1px solid #e0e5e9;
    border-radius: 0.375rem;
    padding: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.topic-answer-content p {
    margin-bottom: 1.2rem;
}

.topic-answer-content p:last-child {
    margin-bottom: 0;
}

.topic-answer-content strong,
.topic-answer-content b {
    color: #566a7f;
    font-weight: 600;
}

.topic-answer-content em,
.topic-answer-content i {
    font-style: italic;
}

.topic-answer-content ul,
.topic-answer-content ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.topic-answer-content ul li,
.topic-answer-content ol li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.topic-answer-content ul li:last-child,
.topic-answer-content ol li:last-child {
    margin-bottom: 0;
}

/* Highlighted text (from backticks) */
.topic-answer-content mark {
    background-color: #d3e3fd;
    color: #566a7f;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* Competitor suggestion card hover effect */
.competitor-suggestion-card {
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.competitor-suggestion-card:hover {
    background-color: rgba(62, 177, 255, 0.05);
    border-color: var(--bs-primary) !important;
}

.competitor-suggestion-card .form-check-input:checked ~ .form-check-label {
    opacity: 1;
}

/* AI answer content styling (for opportunities) */
.ai-answer-content {
    line-height: 1.7;
}

.ai-answer-content p {
    margin-bottom: 1rem;
}

.ai-answer-content ul,
.ai-answer-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.ai-answer-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.ai-answer-content ul li:last-child,
.ai-answer-content ol li:last-child {
    margin-bottom: 0;
}

.cursor-help {
    cursor: help !important;
}

.table-success .bx-link-external {
    color: #646e78;
}

.card-nobg {
    background: none;
    border: none;
    box-shadow: none;
}

.card-md {
    max-width: 900px;
    margin: 0 auto;
}

/* Plans comparison table */
.pricing-plans-comparison .table tr > th:first-child,
.pricing-plans-comparison .table tr > td:first-child {
    text-align: start;
}

/* ---- SUPPORT CHAT STYLES ---- */

/* Make chat-history-wrapper a flex column so the body shrinks when the footer grows */
.app-chat .app-chat-history .chat-history-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.app-chat .app-chat-history .chat-history-body {
    flex: 1 1 auto;
    overflow-y: auto;
    block-size: auto !important;
    min-height: 0;
}
.app-chat .app-chat-history .chat-history-footer {
    flex-shrink: 0;
}

/* Ticket list item hover */
#ticketList .chat-contact-list-item {
    cursor: pointer;
}

/* Unread badge in ticket list */
#ticketList .badge.bg-primary {
    font-size: 0.7rem;
    min-width: 20px;
}

/* Attachment preview bar */
#attachmentPreview {
    background-color: var(--bs-body-bg);
}

/* File attachment links in chat messages */
.chat-message-text a {
    color: var(--bs-primary);
}
.chat-message-text a:hover {
    text-decoration: underline !important;
}

/* Support chat: attachment filename color in sent messages */
.chat-message-right .chat-message-text .text-body-secondary,
.chat-message-right .chat-message-text small {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Active ticket sidebar: keep text readable */
#ticketList .chat-contact-list-item.active .chat-contact-name,
#ticketList .chat-contact-list-item.active small,
#ticketList .chat-contact-list-item.active .chat-contact-status {
    color: #fff !important;
}

/* Support chat: "No tickets yet" - centred flex column */
#noTickets {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dropzone .dz-image {
    text-align: center;
}

/* Suggestion icon in ticket list */
#ticketList .avatar.bg-label-warning {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}
#ticketList .avatar.bg-label-primary {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

/* ---- RESPONSIVE STYLES ---- */
@media (min-width: 576px) {
    .plan-switch {
        margin-inline-start: 6rem !important;
    }
}

/* ---- ADMIN: ONLINE USERS ---- */
.session-inactive {
    opacity: 0.5;
    filter: grayscale(0.4);
}

.live-indicator i {
    animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

