.bolmol-comments {
    --bmc-fg-muted:    #606770;
    --bmc-fg-subtle:   #8a8d91;
    --bmc-line:        #e4e6eb;
    --bmc-line-strong: #ccd0d5;
    --bmc-accent:      #1877F2;
    --bmc-accent-hov:  #166FE5;
    --bmc-bg:   #f0f2f5;
    --bmc-danger:      #F02849;
    --bmc-success:     #42B72A;
    --bmc-focus:       rgba(24, 119, 242, 0.35);

    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    text-align: start;
    width: 100%;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    color-scheme: light;
}

.bolmol-comments *,
.bolmol-comments *::before,
.bolmol-comments *::after {
    box-sizing: border-box;
}

.bolmol-comments .bmc-root {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.bolmol-comments .bmc-continue {
    position: relative;
}

/* ── Header ─────────────────────────────────────────────── */
.bolmol-comments .bmc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--bmc-line);
}

.bolmol-comments .bmc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    min-width: 0;
}

.bolmol-comments .bmc-title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bolmol-comments .bmc-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--bmc-bg);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.bolmol-comments .bmc-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 6px;
    padding: 2px;
    transition: opacity 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.bolmol-comments .bmc-brand:hover {
    opacity: 0.8;
    transform: scale(1.06);
}

.bolmol-comments .bmc-brand:active {
    transform: scale(0.98);
}

.bolmol-comments .bmc-brand:focus-visible {
    outline: 2px solid var(--bmc-accent);
    outline-offset: 2px;
}

.bolmol-comments .bmc-brand-img {
    display: block;
    width: 72px;
    height: 16px;
    object-fit: contain;
}

/* ── Auth ───────────────────────────────────────────────── */
.bolmol-comments .bmc-auth {
    margin-bottom: 18px;
}

.bolmol-comments .bmc-login-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 20px 18px;
    border: 1px solid var(--bmc-line);
    border-radius: 10px;
    background: var(--bmc-bg);
}

.bolmol-comments .bmc-login-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bmc-fg-muted);
    margin: 0;
    text-align: center;
}

.bolmol-comments .bmc-login-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.bolmol-comments .bmc-provider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 18px;
    min-height: 42px;
    background: var(--bmc-bg);
    border: 1px solid var(--bmc-line-strong);
    border-radius: 8px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, transform 0.06s;
}

.bolmol-comments .bmc-provider-icon {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.bolmol-comments .bmc-provider-btn:hover,
.bolmol-comments .bmc-provider-btn:focus {
    background: var(--bmc-bg);
    border-color: var(--bmc-fg-subtle);
    text-decoration: none;
}

.bolmol-comments .bmc-provider-btn:active { transform: translateY(1px); }

.bolmol-comments .bmc-provider-btn:focus-visible {
    outline: 2px solid var(--bmc-accent);
    outline-offset: 2px;
}

.bolmol-comments .bmc-provider-btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

.bolmol-comments .bmc-terms-required .bmc-login-title {
    font-weight: 500;
}

.bolmol-comments .bmc-terms-links {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: var(--bmc-fg-muted);
    text-align: center;
}

.bolmol-comments .bmc-terms-links a {
    color: var(--bmc-accent);
    text-decoration: none;
}

.bolmol-comments .bmc-terms-links a:hover {
    text-decoration: underline;
}

/* ── Composer ───────────────────────────────────────────── */
.bolmol-comments .bmc-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: #f0f2f5;
    background: color-mix(in srgb, var(--bmc-fg-muted) 10%, transparent);
    border-radius: 10px;
    margin-bottom: 18px;
}

.bolmol-comments .bmc-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--bmc-fg-muted);
    flex-wrap: wrap;
}

.bolmol-comments .bmc-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.bolmol-comments .bmc-user-name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bolmol-comments .bmc-user-name strong {
    font-weight: 600;
}

.bolmol-comments .bmc-link {
    background: none;
    border: 0;
    padding: 4px 6px;
    border-radius: 6px;
    color: var(--bmc-accent);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s;
}

.bolmol-comments .bmc-link:hover,
.bolmol-comments .bmc-link:focus {
    background: var(--bmc-bg);
    text-decoration: none;
}

.bolmol-comments .bmc-link:focus-visible {
    outline: 2px solid var(--bmc-accent);
    outline-offset: 2px;
}

.bolmol-comments .bmc-textarea,
.bolmol-comments .bmc-reply-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--bmc-line-strong);
    border-radius: 8px;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.bolmol-comments .bmc-textarea { min-height: 76px; }
.bolmol-comments .bmc-reply-input { min-height: 60px; font-size: 0.9rem; }

.bolmol-comments .bmc-textarea:focus,
.bolmol-comments .bmc-reply-input:focus {
    border-color: var(--bmc-accent);
    box-shadow: 0 0 0 3px var(--bmc-focus);
}

.bolmol-comments .bmc-textarea::placeholder,
.bolmol-comments .bmc-reply-input::placeholder {
    color: var(--bmc-fg-subtle);
}

.bolmol-comments .bmc-edit-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: #f0f2f5;
    background: color-mix(in srgb, var(--bmc-fg-muted) 10%, transparent);
    border-radius: 10px;
}

.bolmol-comments .bmc-hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.bolmol-comments .bmc-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bolmol-comments .bmc-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    min-height: 40px;
    background: var(--bmc-accent);
    color: #ffffff;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, opacity 0.12s, transform 0.06s;
}

.bolmol-comments .bmc-submit:hover:not(:disabled) { background: var(--bmc-accent-hov); }
.bolmol-comments .bmc-submit:active:not(:disabled) { transform: translateY(1px); }
.bolmol-comments .bmc-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.bolmol-comments .bmc-submit:focus-visible {
    outline: 2px solid var(--bmc-accent);
    outline-offset: 2px;
}

/* ── Loader ─────────────────────────────────────────────── */
.bolmol-comments .bmc-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 0;
    min-height: 78px;
}

.bolmol-comments .bmc-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--bmc-line);
    border-top-color: var(--bmc-accent);
    border-radius: 50%;
    animation: bmc-spin 0.8s linear infinite;
}

@keyframes bmc-spin { to { transform: rotate(360deg); } }

/* ── List ───────────────────────────────────────────────── */
.bolmol-comments .bmc-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bolmol-comments .bmc-item {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bmc-line);
}

.bolmol-comments .bmc-item:last-child { border-bottom: none; }

.bolmol-comments .bmc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.bolmol-comments .bmc-body {
    flex: 1;
    min-width: 0;
}

.bolmol-comments .bmc-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    line-height: 1.3;
}

.bolmol-comments .bmc-author {
    font-weight: 700;
    font-size: 0.92rem;
    word-break: break-word;
    min-width: 0;
}

.bolmol-comments .bmc-profile-link {
    color: inherit;
    text-decoration: none;
}

.bolmol-comments .bmc-profile-link:hover,
.bolmol-comments .bmc-profile-link:focus {
    color: var(--bmc-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bolmol-comments .bmc-author .bmc-profile-link {
    font-weight: 700;
}

.bolmol-comments .bmc-time {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--bmc-fg-subtle);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.bolmol-comments .bmc-handle-row {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--bmc-fg-muted);
    line-height: 1.3;
    margin-top: 1px;
    word-break: break-word;
}

.bolmol-comments .bmc-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 6px;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.bolmol-comments .bmc-text a {
    word-break: break-all;
}

.bolmol-comments .bmc-edited-line {
    font-size: 0.7rem;
    font-weight: 400;
    font-style: italic;
    color: var(--bmc-fg-subtle);
    line-height: 1.3;
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
}

.bolmol-comments .bmc-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.bolmol-comments .bmc-actions-spacer {
    flex: 1 1 auto;
    min-width: 8px;
}

.bolmol-comments .bmc-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    min-height: 30px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bmc-fg-muted);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.bolmol-comments .bmc-action:hover:not(:disabled),
.bolmol-comments .bmc-action:focus-visible:not(:disabled) {
    background: var(--bmc-bg);
}

.bolmol-comments .bmc-action:focus-visible {
    outline: 2px solid var(--bmc-accent);
    outline-offset: 2px;
}

.bolmol-comments .bmc-action:disabled { opacity: 0.4; cursor: not-allowed; }

.bolmol-comments .bmc-action.is-active { color: var(--bmc-success); }
.bolmol-comments .bmc-action.is-active.bmc-dislike { color: var(--bmc-danger); }

.bolmol-comments .bmc-action.bmc-report:disabled {
    color: var(--bmc-fg-subtle);
    cursor: default;
    opacity: 1;
}

.bolmol-comments .bmc-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    vertical-align: -2px;
    color: currentColor;
    stroke: currentColor;
    fill: none;
}

.bolmol-comments .bmc-num {
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.bolmol-comments .bmc-action-more {
    margin-top: 8px;
    background: var(--bmc-bg);
}

/* ── Replies ────────────────────────────────────────────── */
.bolmol-comments .bmc-replies {
    margin-inline-start: 4px;
    margin-top: 10px;
    padding-inline-start: 12px;
    border-inline-start: 2px solid var(--bmc-line);
}

.bolmol-comments .bmc-replies .bmc-item {
    padding: 10px 0;
}

.bolmol-comments .bmc-reply-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: #f0f2f5;
    background: color-mix(in srgb, var(--bmc-fg-muted) 10%, transparent);
    border-radius: 10px;
}

/* ── Load more ──────────────────────────────────────────── */
.bolmol-comments .bmc-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 16px;
    padding: 11px 16px;
    min-height: 44px;
    background: var(--bmc-bg);
    border: 1px solid var(--bmc-line-strong);
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.bolmol-comments .bmc-more:hover:not(:disabled) {
    background: var(--bmc-bg);
    border-color: var(--bmc-fg-subtle);
}

.bolmol-comments .bmc-more:disabled { opacity: 0.6; cursor: not-allowed; }

.bolmol-comments .bmc-more:focus-visible {
    outline: 2px solid var(--bmc-accent);
    outline-offset: 2px;
}

/* ── Empty ──────────────────────────────────────────────── */
.bolmol-comments .bmc-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--bmc-fg-muted);
    line-height: 1.5;
    min-height: 72px;
}

/* ── Report modal ───────────────────────────────────────── */
.bolmol-comments .bmc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483645;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.bolmol-comments .bmc-modal[hidden] { display: none; }

.bolmol-comments .bmc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.bolmol-comments .bmc-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: var(--bmc-bg);
    border: 1px solid var(--bmc-line);
    border-radius: 12px;
    padding: 20px 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    font: inherit;
    box-sizing: border-box;
}

.bolmol-comments .bmc-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.bolmol-comments .bmc-modal-text {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--bmc-fg-muted);
    margin: 0 0 16px;
}

.bolmol-comments .bmc-modal-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bolmol-comments .bmc-modal-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bmc-fg-muted);
    margin-top: 4px;
}

.bolmol-comments .bmc-modal-select,
.bolmol-comments .bmc-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--bmc-line-strong);
    border-radius: 8px;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s;
    box-sizing: border-box;
}

.bolmol-comments .bmc-modal-input {
    min-height: 72px;
    resize: vertical;
}

.bolmol-comments .bmc-modal-select:focus,
.bolmol-comments .bmc-modal-input:focus {
    border-color: var(--bmc-accent);
    box-shadow: 0 0 0 3px var(--bmc-focus);
}

.bolmol-comments .bmc-modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ── Long text collapse ─────────────────────────────────── */
.bolmol-comments .bmc-text.bmc-clamped {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.bolmol-comments .bmc-readmore {
    display: inline-block;
    margin-top: 4px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--bmc-accent);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.bolmol-comments .bmc-readmore:hover,
.bolmol-comments .bmc-readmore:focus {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bolmol-comments .bmc-readmore:focus-visible {
    outline: 2px solid var(--bmc-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .bolmol-comments *,
    .bolmol-comments *::before,
    .bolmol-comments *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .bolmol-comments .bmc-spinner {
        animation: none;
        border-top-color: var(--bmc-fg-subtle);
    }
    .bolmol-comments .bmc-brand:hover { transform: none; }
    .bolmol-comments .bmc-modal-backdrop {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ── Print ──────────────────────────────────────────────── */
@media print {
    .bolmol-comments { display: none !important; }
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .bolmol-comments { font-size: 14px; }
    .bolmol-comments .bmc-title { font-size: 1rem; }
    .bolmol-comments .bmc-brand-img { width: 60px; height: 14px; }
    .bolmol-comments .bmc-item { gap: 8px; padding: 10px 0; }
    .bolmol-comments .bmc-avatar { width: 32px; height: 32px; }
    .bolmol-comments .bmc-action { padding: 5px 7px; font-size: 0.75rem; }
    .bolmol-comments .bmc-form-actions { justify-content: stretch; }
    .bolmol-comments .bmc-submit { flex: 1 1 auto; }
    .bolmol-comments .bmc-provider-btn { width: 100%; }
    .bolmol-comments .bmc-replies { padding-inline-start: 10px; }

    .bolmol-comments .bmc-modal {
        align-items: flex-end;
        padding: 0;
    }
    .bolmol-comments .bmc-modal-dialog {
        max-width: none;
        border-radius: 14px 14px 0 0;
        padding: 18px 16px 22px;
        max-height: 90vh;
    }
    .bolmol-comments .bmc-modal-actions { justify-content: stretch; }
    .bolmol-comments .bmc-modal-actions .bmc-submit,
    .bolmol-comments .bmc-modal-actions .bmc-action { flex: 1 1 auto; }
}
