.stph-best-nearest-terms-wrapper {
    background-color: #f9f9f9;
    border-left: 5px solid #3a7a1a;
    padding: 24px;
    margin: 30px 0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.rtl .stph-best-nearest-terms-wrapper {
    border-right: 5px solid #3a7a1a;
    border-left: none;
}

.stph-best-nearest-terms-msg {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
    color: #444444;
}

/* Tree Main List */
.stph-best-nearest-terms-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stph-best-term-node {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Header: Category Pill & Count */
.stph-best-term-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stph-best-term-pill {
    display: inline-block;
    padding: 8px 18px;
    background-color: #ffffff;
    color: #3a7a1a;
    border: 1px solid #3a7a1a;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease-in-out;
}

.stph-best-term-pill:hover,
.stph-best-term-pill:focus {
    background-color: #3a7a1a;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 3px 6px rgba(58, 122, 26, 0.2);
}

.stph-best-term-count {
    font-size: 13px;
    color: #666;
    background: #ebebeb;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* Branch Structure (Tree Lines) */
.stph-best-branch {
    list-style: none !important;
    margin: 8px 0 0 24px !important;
    padding-left: 20px !important;
    border-left: 2px dashed #3a7a1a;
    position: relative;
}

body.rtl .stph-best-branch {
    margin: 8px 24px 0 0 !important;
    padding-left: 0 !important;
    padding-right: 20px !important;
    border-left: none;
    border-right: 2px dashed #3a7a1a;
}

.stph-best-branch li {
    position: relative;
    padding-bottom: 8px;
}

.stph-best-branch li::before {
    content: "";
    position: absolute;
    top: 25px;
    left: -20px;
    width: 20px;
    border-top: 2px dashed #3a7a1a;
}

body.rtl .stph-best-branch li::before {
    left: auto;
    right: -20px;
}

/* Phone Details Card */
.stph-best-phone-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 16px;
    border-radius: 8px;
    margin-top: 10px;
}

.stph-best-example-label {
    display: block;
    color: #666666;
    font-size: 13px;
    margin-bottom: 6px;
}

.stph-best-phone-title {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 12px;
}

.stph-best-phone-title:hover {
    color: #3a7a1a;
}

.stph-best-phone-specs {
    font-size: 13px;
    line-height: 1.6;
    color: #555555;
    margin: 0;
    background-color: #f7f7f7;
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid #e0e0e0;
}

.stph-best-specs-intro {
    display: block;
    font-weight: 700;
    color: #333333;
    margin-bottom: 6px;
}

.stph-best-separator {
    color: #cccccc;
    margin: 0 4px;
}