/* Dashboard & Global Layout */
.upseo-main-panel {
    background-color: #f8fafc;
    padding-bottom: 40px;
}

/* Hero KPI Overview Box */
.keyword-hero-card {
    display: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.hero-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 768px) {
    .hero-top-row {
        grid-template-columns: 1fr;
    }
}
.hero-kw-block {
    padding: 14px 16px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hero-kw-block.main-kw {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.hero-kw-block.suggested-kw {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}
.hero-lbl {
    font-size: 13px;
    font-weight: bold;
    color: #475569;
}
.hero-kw-block.main-kw .hero-val {
    font-size: 18px;
    font-weight: 800;
    color: #15803d;
}
.hero-kw-block.suggested-kw .hero-val {
    font-size: 18px;
    font-weight: 800;
    color: #0369a1;
}
.hero-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}
.hero-stat-chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.chip-highcomp { background: #fee2e2; color: #991b1b; }
.chip-lowcomp { background: #fef3c7; color: #92400e; }
.chip-longtail { background: #dcfce7; color: #166534; }

/* Dendrogram Tree Card (Compact RTL Layout) */
.dendrogram-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}
.dendrogram-header {
    background: #f8fafc;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.dendrogram-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tree-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.badge-tree {
    background: #0284c7;
    color: #ffffff;
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 6px;
}

/* Enhancement 3: Interactive Filter Search Field */
.dendrogram-search-box {
    position: relative;
}
.tree-search-input {
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    outline: none;
    width: 220px;
    transition: all 0.2s ease;
    background: #ffffff;
}
.tree-search-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
    width: 260px;
}

.dendrogram-scroll-box {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 14px;
    background: #ffffff;
    direction: rtl !important;
    text-align: right !important;
}
.dendrogram-svg {
    min-width: 950px;
    width: 100%;
    height: auto;
    display: block;
}

/* Tree Leaf Node Interactivity (Click-to-Copy & Highlights) */
.tree-leaf-node.is-clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.tree-leaf-node.is-clickable:hover text {
    fill: #0284c7 !important;
}
.tree-leaf-node.is-clickable:hover circle {
    fill: #0284c7 !important;
}
.tree-leaf-node.is-highlighted text {
    fill: #b45309 !important;
    font-weight: 900 !important;
}
.tree-leaf-node.is-highlighted circle {
    fill: #f59e0b !important;
}

/* Enhancement 1: Lightweight Floating Copy Toast */
.seo-copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
}
.seo-copy-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}
.seo-copy-toast i {
    color: #10b981;
}

/* Upgrade Card at the Bottom of Report */
.unlock-bottom-card {
    display: none;
    background: #fffbeb;
    border: 2px dashed #f59e0b;
    border-radius: 12px;
    padding: 24px 20px;
    margin: 24px 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
}
.unlock-icon-wrap {
    font-size: 32px;
    color: #d97706;
    margin-bottom: 10px;
}
.unlock-heading {
    font-size: 18px;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 10px;
}
.unlock-desc {
    font-size: 14.5px;
    color: #78350f;
    line-height: 1.8;
    max-width: 750px;
    margin: 0 auto 16px auto;
}
.unlock-bottom-card .btn-warning {
    font-weight: 800;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.25);
}

/* Action Buttons Footer */
.action-buttons {
    margin: 28px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.action-buttons .btn {
    font-weight: bold;
    border-radius: 8px;
    padding: 10px 18px;
}