/* ==========================================================================
   SEO & GEO ON-PAGE UI — CÔ LẬP TIỀN TỐ .geo-* & 100% PRINT-SAFE
   --------------------------------------------------------------------------
   - Cung cấp dữ liệu ngữ nghĩa (Breadcrumbs, AI Summary Box, Topic Cluster)
     cho Googlebot & AI Search Crawlers (ChatGPT, Perplexity, Claude, Gemini).
   - Tự động biến mất hoàn toàn (0px) khi bấm In giấy A4 hoặc Xuất file PDF.
   ========================================================================== */

.geo-top-wrap {
    width: 100%;
    max-width: 794px;
    margin: 0 auto;
    padding: 8px 8px 2px 8px;
}

.geo-breadcrumbs {
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.geo-breadcrumbs .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
}

.geo-summary-box {
    border: 1.5px solid #dbeafe !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.geo-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.geo-metric-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.79rem;
    line-height: 1.35;
}

.geo-metric-pill span {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
}

.geo-metric-pill strong {
    color: #0f172a;
    font-weight: 800;
}

.geo-topic-cluster {
    width: 100%;
    max-width: 794px;
    margin: 4px auto 24px auto;
    padding: 0 8px;
}

.geo-cluster-card {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px 16px;
}

.geo-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.geo-related-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.geo-related-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.geo-seo-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #cbd5e1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.78rem;
    color: #64748b;
}

.geo-site-address {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.9rem;
    line-height: 1.4;
}

.geo-site-address a {
    color: #1d4ed8;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* --- KHIÊN BẢO VỆ TUYỆT ĐỐI KHI IN GIẤY A4 & XUẤT PDF --- */
body.is-exporting-pdf .geo-top-wrap,
body.is-exporting-pdf .geo-breadcrumbs,
body.is-exporting-pdf .geo-summary-box,
body.is-exporting-pdf .geo-topic-cluster,
body.is-exporting-pdf .geo-seo-footer {
    display: none !important;
}

@media print {
    .geo-top-wrap,
    .geo-breadcrumbs,
    .geo-summary-box,
    .geo-topic-cluster,
    .geo-seo-footer {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
}
