/* =============================================================
   BizList – Features CSS
   B. Business Claiming | C. Notifications | D. Report Review
   E. Schema (no CSS) | F. Compare | G. Trending | H. Submission
   ============================================================= */

/* ====== RESET HELPERS ====== */
.hidden { display: none !important; }

/* ================================================================
   B. BUSINESS CLAIMING
   ================================================================ */
.bl-claim-manage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.bl-claim-pending {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--bl-text-muted, #6b7280);
    padding: 6px 10px;
    border: 1px dashed currentColor;
    border-radius: 8px;
}

/* Modal claim */
.bl-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: blFadeIn .15s ease;
}
.bl-modal-overlay[hidden] { display: none; }
@keyframes blFadeIn { from { opacity:0 } to { opacity:1 } }

.bl-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    animation: blSlideUp .18s ease;
}
@media (prefers-color-scheme: dark) {
    .bl-modal-box { background: #1e2029; color: #e5e7eb; }
}
@keyframes blSlideUp { from { transform: translateY(24px); opacity:0 } to { transform: none; opacity:1 } }

.bl-modal-box h3 { margin: 0 0 8px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.bl-modal-box p  { margin: 0 0 16px; color: #6b7280; font-size: 14px; }
.bl-modal-box textarea {
    width: 100%; min-height: 90px; resize: vertical;
    border: 1.5px solid #e5e7eb; border-radius: 10px;
    padding: 10px 12px; font-size: 14px; font-family: inherit;
    margin-bottom: 16px; box-sizing: border-box;
}
.bl-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ================================================================
   C. NOTIFICATIONS
   ================================================================ */
.bl-notif-wrap {
    position: relative;
}
.bl-notif-btn {
    position: relative;
    background: none; border: none; cursor: pointer;
    padding: 7px; border-radius: 10px;
    color: inherit;
    transition: background .15s;
    display: flex; align-items: center;
}
.bl-notif-btn:hover,
.bl-notif-btn[aria-expanded="true"] { background: rgba(0,0,0,.06); }

.bl-notif-badge {
    position: absolute; top: 2px; right: 2px;
    background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 700; line-height: 1;
    min-width: 16px; height: 16px;
    border-radius: 8px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
    pointer-events: none;
}

.bl-notif-panel {
    position: absolute; top: calc(100% + 10px); right: 0;
    width: 340px; max-width: calc(100vw - 20px);
    background: #fff; border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.14);
    border: 1px solid #f0f0f0;
    z-index: 1000;
    animation: blSlideUp .16s ease;
    overflow: hidden;
}
@media (prefers-color-scheme: dark) {
    .bl-notif-panel { background: #1e2029; border-color: #2d2f3d; }
}
.bl-notif-panel[hidden] { display: none; }

.bl-notif-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid #f3f4f6;
}
.bl-notif-head strong { font-size: 15px; }
.bl-notif-readall {
    background: none; border: none; cursor: pointer;
    font-size: 12px; color: var(--bl-primary, #0b6bf2);
    padding: 0; text-decoration: underline;
}

.bl-notif-list {
    list-style: none; margin: 0; padding: 0;
    max-height: 360px; overflow-y: auto;
}
.bl-notif-list li.bl-notif-loading {
    padding: 24px; text-align: center; color: #9ca3af; font-size: 14px;
}
.bl-notif-item {
    display: grid; grid-template-columns: auto 1fr auto;
    gap: 10px; padding: 12px 16px;
    border-bottom: 1px solid #f9fafb;
    transition: background .15s; cursor: pointer; text-decoration: none; color: inherit;
}
.bl-notif-item:last-child { border-bottom: none; }
.bl-notif-item:hover { background: #f9fafb; }
.bl-notif-item.is-unread { background: #eff6ff; }
@media (prefers-color-scheme: dark) {
    .bl-notif-item:hover  { background: #252733; }
    .bl-notif-item.is-unread { background: #1a2540; }
    .bl-notif-list li { border-color: #2d2f3d; }
}
.bl-notif-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #0b6bf2;
    margin-top: 6px; flex-shrink: 0;
}
.bl-notif-item:not(.is-unread) .bl-notif-dot { opacity: 0; }
.bl-notif-body { overflow: hidden; }
.bl-notif-body strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-notif-body small  { font-size: 12px; color: #6b7280; }
.bl-notif-del {
    background: none; border: none; cursor: pointer; opacity: 0;
    color: #9ca3af; padding: 2px; align-self: start;
    transition: opacity .15s;
}
.bl-notif-item:hover .bl-notif-del { opacity: 1; }
.bl-notif-footer {
    padding: 10px 16px;
    border-top: 1px solid #f3f4f6;
    text-align: center;
    font-size: 13px;
}

/* ================================================================
   D. REPORT REVIEW
   ================================================================ */
.bl-report-btn {
    background: none; border: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #9ca3af;
    padding: 4px 8px; border-radius: 6px;
    transition: color .15s, background .15s;
}
.bl-report-btn:hover { color: #ef4444; background: #fef2f2; }

.bl-report-done {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #9ca3af; cursor: default;
    padding: 4px 8px;
}

/* Report modal */
.bl-report-modal .bl-modal-box { max-width: 420px; }
.bl-report-reasons { list-style: none; margin: 0 0 14px; padding: 0; }
.bl-report-reasons li {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px; cursor: pointer;
    font-size: 14px; transition: background .12s;
}
.bl-report-reasons li:hover { background: #f5f5f5; }
.bl-report-reasons input[type=radio] { accent-color: var(--bl-primary, #0b6bf2); }
.bl-report-detail {
    width: 100%; border: 1.5px solid #e5e7eb; border-radius: 10px;
    padding: 9px 12px; font-size: 14px; font-family: inherit;
    min-height: 70px; resize: vertical; box-sizing: border-box; margin-bottom: 14px;
}

/* ================================================================
   F. BUSINESS COMPARISON
   ================================================================ */

/* Nút compare trên card */
.bl-compare-btn {
    position: absolute;
    top: auto;      /* reset bất kỳ inherited top */
    right: auto;    /* reset bất kỳ inherited right */
    bottom: 10px;
    left: 10px;
    background: rgba(255,255,255,.92);
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 6px;
    color: #374151;
    display: flex;
    align-items: center;
    z-index: 3;
    transition: background .15s, border-color .15s, color .15s;
    backdrop-filter: blur(4px);
}
.bl-compare-btn:hover,
.bl-compare-btn.is-active { background: var(--bl-primary, #0b6bf2); border-color: var(--bl-primary, #0b6bf2); color: #fff; }

/* Thanh compare (sticky bottom) */
.bl-compare-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 888;
    background: #fff; border-top: 2px solid #e5e7eb;
    box-shadow: 0 -4px 24px rgba(0,0,0,.1);
    display: flex; align-items: center;
    gap: 12px; padding: 12px 20px;
    animation: blSlideBarIn .2s ease;
}
@keyframes blSlideBarIn { from { transform: translateY(100%) } to { transform: none } }
.bl-compare-bar[hidden] { display: none; }
@media (prefers-color-scheme: dark) { .bl-compare-bar { background: #1e2029; border-color: #2d2f3d; } }

.bl-compare-bar-items {
    flex: 1; display: flex; gap: 10px; overflow-x: auto;
}
.bl-compare-item {
    display: flex; align-items: center; gap: 7px;
    background: #f9fafb; border: 1.5px solid #e5e7eb;
    border-radius: 10px; padding: 6px 10px 6px 8px;
    font-size: 13px; white-space: nowrap;
    animation: blFadeIn .15s ease;
}
.bl-compare-item img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }
.bl-compare-item-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.bl-compare-item-remove {
    background: none; border: none; cursor: pointer; color: #9ca3af;
    padding: 2px; line-height: 1;
}
.bl-compare-item-remove:hover { color: #ef4444; }
.bl-compare-bar-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Trang so sánh */
.bl-compare-page { padding: 24px 0 48px; }
.bl-compare-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 24px; margin-bottom: 24px;
}
.bl-compare-table-wrap { overflow-x: auto; }
.bl-compare-table {
    width: 100%; border-collapse: collapse;
    min-width: 500px;
}
.bl-compare-table th,
.bl-compare-table td {
    padding: 14px 16px; border: 1px solid #f0f0f0;
    vertical-align: top; text-align: left;
}
.bl-compare-table thead th {
    background: #f9fafb; text-align: center;
    border-bottom: 2px solid #e5e7eb;
}
.bl-compare-table thead th a {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    text-decoration: none; color: inherit;
}
.bl-cmp-cover {
    width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
}
.bl-cmp-cover img, .bl-cmp-cover span { width: 100%; height: 100%; object-fit: cover; }
.bl-cmp-label {
    font-weight: 600; font-size: 13px; color: #6b7280;
    background: #fafafa; white-space: nowrap; width: 160px;
}
.bl-compare-table tbody tr:nth-child(even) { background: #fafafa; }
.bl-compare-table tbody tr:hover { background: #f0f9ff; }
.bl-cmp-list { margin: 0; padding-left: 16px; font-size: 13px; }
.bl-cmp-actions-row td { text-align: center; background: #f9fafb !important; padding: 16px; }

/* ================================================================
   G. TRENDING BADGE
   Dùng class .bl-trending-pill — KHÔNG kế thừa .bl-badge
   để tránh xung đột với top/left của .bl-badge trong main.css
   ================================================================ */
.bl-trending-pill {
    /* Layout tự thân */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    /* Visual */
    background: linear-gradient(135deg, #ff6b35, #ff9f1c);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    padding: 4px 9px;
    border-radius: 20px;
    letter-spacing: .3px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, .35);
    white-space: nowrap;
    pointer-events: none;
    /* Đặt mặc định không position; override theo context bên dưới */
}
.bl-trending-pill .bl-i { color: #fff; }

/* Trên card: overlay góc dưới-phải ảnh, hoàn toàn tách khỏi card-body */
.bl-card .bl-trending-pill {
    position: absolute;
    /* Reset bất kỳ top/left nào có thể bị kế thừa */
    top: auto;
    left: auto;
    bottom: 10px;
    right: 10px;
    z-index: 3;
}

/* Trên trang single: inline, không absolute */
.bl-single .bl-trending-pill {
    position: static;
    margin-left: 8px;
    vertical-align: middle;
}

/* ================================================================
   H. FRONTEND SUBMISSION FORM
   ================================================================ */
.bl-submit-wrap { max-width: 800px; margin: 0 auto; padding: 24px 0 60px; }

.bl-submit-hero {
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border-radius: 16px; padding: 24px 28px; margin-bottom: 28px;
}
.bl-submit-hero .bl-i { color: var(--bl-primary, #0b6bf2); flex-shrink: 0; }
.bl-submit-hero h1 { margin: 0 0 4px; font-size: 22px; }
.bl-submit-hero p  { margin: 0; color: #6b7280; font-size: 14px; }

.bl-submit-notice {
    border-radius: 10px; padding: 14px 18px;
    margin-bottom: 20px; font-size: 14px;
}
.bl-submit-notice.is-success { background: #f0fdf4; border: 1.5px solid #86efac; color: #15803d; }
.bl-submit-notice.is-error   { background: #fef2f2; border: 1.5px solid #fca5a5; color: #dc2626; }

.bl-submit-form { display: flex; flex-direction: column; gap: 20px; }

.bl-sf-section {
    background: #fff; border: 1.5px solid #f0f0f0;
    border-radius: 16px; padding: 24px;
}
@media (prefers-color-scheme: dark) {
    .bl-sf-section { background: #1e2029; border-color: #2d2f3d; }
}

.bl-sf-heading {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; margin: 0 0 18px; color: #111827;
}
@media (prefers-color-scheme: dark) { .bl-sf-heading { color: #f9fafb; } }

.bl-sf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) { .bl-sf-grid { grid-template-columns: 1fr; } }

.bl-sf-full { grid-column: 1 / -1; }

.bl-sf-field { display: flex; flex-direction: column; gap: 6px; }
.bl-sf-field label { font-size: 13px; font-weight: 600; color: #374151; }
@media (prefers-color-scheme: dark) { .bl-sf-field label { color: #d1d5db; } }
.bl-sf-required label::after { content: ' *'; color: #ef4444; }

.bl-sf-field input[type=text],
.bl-sf-field input[type=tel],
.bl-sf-field input[type=email],
.bl-sf-field input[type=url],
.bl-sf-field input[type=number],
.bl-sf-field select,
.bl-sf-field textarea {
    border: 1.5px solid #e5e7eb; border-radius: 10px;
    padding: 10px 13px; font-size: 14px; font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
    background: #fff; color: #111827;
}
@media (prefers-color-scheme: dark) {
    .bl-sf-field input,
    .bl-sf-field select,
    .bl-sf-field textarea { background: #252733; border-color: #3d3f4d; color: #f9fafb; }
}
.bl-sf-field input:focus,
.bl-sf-field select:focus,
.bl-sf-field textarea:focus {
    outline: none;
    border-color: var(--bl-primary, #0b6bf2);
    box-shadow: 0 0 0 3px rgba(11,107,242,.12);
}
.bl-sf-field input.is-error,
.bl-sf-field select.is-error,
.bl-sf-field textarea.is-error { border-color: #ef4444; }
.bl-sf-field .bl-sf-err { font-size: 12px; color: #ef4444; display: none; }
.bl-sf-field .bl-sf-err.visible { display: block; }

.bl-sf-note { font-size: 13px; color: #6b7280; margin: -10px 0 14px; }

.bl-sf-media-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bl-sf-media-preview {
    width: 72px; height: 72px; border-radius: 10px; overflow: hidden;
    border: 1.5px solid #e5e7eb; background: #f9fafb;
    display: flex; align-items: center; justify-content: center;
}
.bl-sf-media-preview img { width: 100%; height: 100%; object-fit: cover; }
.bl-btn-link { background: none; border: none; cursor: pointer; color: #9ca3af; font-size: 13px; text-decoration: underline; }

.bl-sf-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}
.bl-sf-terms { font-size: 13px; color: #9ca3af; margin: 0; }
.bl-sf-terms a { color: var(--bl-primary, #0b6bf2); }

/* Danh sách tin đã đăng */
.bl-sf-my-listings { margin-top: 36px; }
.bl-sf-my-listings h2 { font-size: 18px; margin-bottom: 14px; }
.bl-sf-listing-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.bl-sf-listing-list li {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1.5px solid #f0f0f0;
    border-radius: 12px; padding: 12px;
}
.bl-sf-ll-thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.bl-sf-ll-thumb img, .bl-sf-ll-thumb span { width: 100%; height: 100%; object-fit: cover; }
.bl-sf-ll-info { flex: 1; overflow: hidden; }
.bl-sf-ll-info strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-sf-ll-info > div { font-size: 12px; color: #6b7280; margin-top: 2px; }
.bl-sf-ll-actions { display: flex; gap: 6px; flex-shrink: 0; }

.bl-status-publish { color: #15803d; }
.bl-status-pending { color: #92400e; }
.bl-status-draft   { color: #6b7280; }

/* ================================================================
   CLAIM BUTTON trong trang listing
   ================================================================ */
.bl-claim-section {
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
