.search-body img:not(.avatar) {
    width: 2rem;
}

label[for="job_position_main"],
label[for="tutor_search_job_position"] {
    font-weight: 700;
}

.search-body p {
    font-weight: bolder;
    font-size: 14px;
}

@media (max-width: 768px) {
    .search-body p {
        font-size: 10px;
    }
}

.checked-image {
    position: absolute;
    width: 40px !important;
    height: 40px !important;
    right: 0;
    top: 7px;
    display: none;
}

.search-item.active .checked-image {
    display: block;
}

@media (max-width: 400px) {
    .search-body .search-type .d-flex {
        flex-direction: column !important;
        gap: 0.5rem;
    }

    .search-body .search-type .search-item {
        flex-direction: row !important;
        justify-content: flex-start !important;
        gap: 1rem;
        padding: 0.5rem 1rem !important;
    }

    .search-body .search-type img:not(.avatar) {
        width: 56px;
    }

    .search-body .search-type p {
        font-size: 14px;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .search-body .search-type h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem !important;
    }
}

@media (min-width: 401px) and (max-width: 576px) {
    .search-body .search-type .d-flex {
        flex-wrap: nowrap !important;
        gap: 0.25rem;
    }

    .search-body .search-type .search-item {
        flex: 1 1 0;
        min-width: 0;
        padding: 0.5rem 0.25rem !important;
    }

    .search-body .search-type img:not(.avatar) {
        width: 100%;
        max-width: 80px;
    }

    .search-body .search-type p {
        font-size: 12px;
        text-align: center;
        margin-top: 0.5rem !important;
    }

    .search-body .search-type h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem !important;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .search-body .search-type .d-flex {
        flex-wrap: nowrap !important;
    }

    .search-body .search-type img:not(.avatar) {
        width: 100%;
        max-width: 128px;
    }

    .search-body .search-type p {
        font-size: 14px;
        text-align: center;
    }
}

/* Centralized Search Modal Styles (Step 3 Results) */

.border-bold-search {
    border: 2px solid #E8BA00 !important;
    box-shadow: 0 4px 15px rgba(232, 186, 0, 0.15) !important;
}

.border-flashing-bold-search {
    border: 2px solid #E8BA00 !important;
    position: relative;
    overflow: visible !important;
    isolation: isolate;
    animation: premium-pulse 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
}

.border-flashing-bold-search::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    border: 2px solid rgba(232, 186, 0, 0.65);
    pointer-events: none;
    animation: premium-pulse-ring 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes premium-pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(232, 186, 0, 0.45);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 0 6px rgba(232, 186, 0, 0.2);
    }
}

@keyframes premium-pulse-ring {
    0% {
        opacity: 0.9;
        transform: scale(1);
    }

    70% {
        opacity: 0;
        transform: scale(1.04);
    }

    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}

/* Step 3 Results: scrollable results list, re-search button stays visible */
#search-result-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 48vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 186, 0, 0.4) transparent;
}

#search-result-body::-webkit-scrollbar {
    width: 4px;
}

#search-result-body::-webkit-scrollbar-track {
    background: transparent;
}

#search-result-body::-webkit-scrollbar-thumb {
    background: rgba(232, 186, 0, 0.4);
    border-radius: 4px;
}

@media (max-width: 768px) {
    #search-result-body {
        max-height: 52vh;
    }
}

/* ── Search Result Row (Figma Redesign) ── */
#search-result-body .search-head-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
}

#search-result-body .search-head-wrapper:hover {
    text-decoration: none;
    color: inherit;
}

#search-result-body .result-item {
    background: #ffffff;
    border: 1px solid rgba(107, 114, 128, 0.12);
    border-radius: 20px;
    box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
    margin-bottom: 0 !important;
    padding: 0;
}

/* RTL/LTR handled via order on children */

#search-result-body .result-item:hover {
    box-shadow: 0 8px 24px rgba(232, 186, 0, 0.15), 1px 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: rgba(232, 186, 0, 0.4);
}

/* Photo section */
.result-item__photo {
    width: 90px;
    min-width: 90px;
    max-height: 90px;
    background: #F8F8F8;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LTR: photo | info | actions */
[dir="ltr"] .result-item__photo {
    border-radius: 20px 0 0 20px;
    order: 1;
}

[dir="ltr"] .result-item__info {
    order: 2;
}

[dir="ltr"] .result-item__actions {
    order: 3;
}

/* RTL: photo (right) | info | actions (left) */
[dir="rtl"] .result-item__photo {
    border-radius: 0 20px 20px 0;
    order: 1;
}

[dir="rtl"] .result-item__info {
    order: 2;
}

[dir="rtl"] .result-item__actions {
    order: 3;
}

.result-item__avatar {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Info section */
.result-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 10px 16px;
}

[dir="rtl"] .result-item__info {
    text-align: right;
    align-items: flex-end;
    direction: ltr;
}

[dir="ltr"] .result-item__info {
    text-align: left;
    align-items: flex-start;
}

.result-item__name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

[dir="rtl"] .result-item__name-row {
    flex-direction: row-reverse;
}

.result-item__name {
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 20px;
    color: #000000;
}

.result-item__verified {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.result-item__meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

[dir="rtl"] .result-item__meta {
    flex-direction: row-reverse;
}

.result-item__experience {
    font-family: 'Rubik', sans-serif;
    font-weight: 300;
    font-size: 13px;
    line-height: 16px;
    color: #6B7280;
    white-space: nowrap;
}

.result-item__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(107, 114, 128, 0.2);
    flex-shrink: 0;
}

.result-item__meta .Stars {
    font-size: 16px;
}

.result-item__location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Rubik', sans-serif;
    font-weight: 300;
    font-size: 13px;
    line-height: 16px;
    color: #6B7280;
}

[dir="rtl"] .result-item__location {
    flex-direction: row-reverse;
}

.result-item__location i {
    color: #E8BA00;
    font-size: 14px;
}

.result-item__curriculum {
    font-family: 'Rubik', sans-serif;
    font-weight: 300;
    font-size: 13px;
    line-height: 16px;
    color: #111827;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 8px;
    padding: 4px 12px;
    display: inline-block;
}

/* Actions section */
.result-item__actions {
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: stretch;
    padding: 10px 16px;
    flex-shrink: 0;
    min-width: 180px;
    gap: 8px;
}

.result-item__actions:has(.result-item__badges) {
    justify-content: space-between;
}

/* Badges in search row */
.result-item__badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.result-item__badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: visible;
    flex-shrink: 0;
    position: relative;
    cursor: default;
    transition: transform 0.2s ease;
}

.result-item__badge:hover {
    transform: scale(1.12);
}

.result-item__badge>img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.result-item__badge .sd-badge-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    bottom: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #111827;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    min-width: 140px;
    max-width: 200px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.result-item__badge .sd-badge-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #111827;
}

.result-item__badge .sd-badge-tooltip strong {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: #E8BA00;
    margin-bottom: 3px;
}

.result-item__badge .sd-badge-tooltip span {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-weight: 300;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

.result-item__badge:hover .sd-badge-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* View Profile button */
.result-item__view-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    padding: 6px 14px;
    min-width: 140px;
    height: 34px;
    background: linear-gradient(180deg, #FFFFFF -11.7%, #E8BA00 90.43%);
    border: 1px solid rgba(107, 114, 128, 0.12);
    box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 18px;
    color: #111827;
    transition: all 0.2s ease;
}

.result-item:hover .result-item__view-btn {
    box-shadow: 1px 4px 15px rgba(232, 186, 0, 0.3);
}

/* Mobile responsive — compact horizontal row */
@media (max-width: 768px) {
    #search-result-body .result-item {
        border-radius: 16px;
    }

    .result-item__photo {
        width: 75px !important;
        min-width: 75px;
        max-height: 75px;
    }

    .result-item__info {
        padding: 10px 12px;
        gap: 3px;
    }

    .result-item__name {
        font-size: 15px;
        line-height: 18px;
    }

    .result-item__experience,
    .result-item__location,
    .result-item__location span,
    .result-item__curriculum {
        font-size: 12px;
        line-height: 14px;
    }

    .result-item__location i {
        font-size: 12px;
    }

    .result-item__meta {
        gap: 6px;
        flex-wrap: wrap;
    }

    .result-item__meta .Stars {
        font-size: 13px;
    }

    .result-item__actions {
        min-width: unset;
        padding: 8px 10px;
        gap: 6px;
    }

    .result-item__badges {
        gap: 4px;
        justify-content: end;
    }

    .result-item__badge {
        width: 40px;
        height: 40px;
    }

    .result-item__view-btn {
        min-width: unset;
        padding: 4px 10px;
        height: 28px;
        font-size: 12px;
        line-height: 14px;
    }
}

@media (max-width: 480px) {
    .result-item__photo {
        width: 62px !important;
        min-width: 62px;
        max-height: 62px;
    }

    .result-item__name {
        font-size: 14px;
        line-height: 17px;
    }

    .result-item__actions {
        padding: 6px 8px;
    }

    .result-item__view-btn {
        padding: 4px 8px;
        font-size: 11px;
        height: 26px;
    }

    .result-item__badge {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 400px) {
    .result-item__photo {
        width: 54px !important;
        min-width: 54px;
        max-height: 54px;
    }

    .result-item__info {
        padding: 8px 10px;
        gap: 2px;
    }

    .result-item__name {
        font-size: 13px;
        line-height: 16px;
    }

    .result-item__experience,
    .result-item__location,
    .result-item__location span,
    .result-item__curriculum {
        font-size: 11px;
        line-height: 13px;
    }

    .result-item__meta {
        gap: 4px;
    }

    .result-item__meta .Stars {
        font-size: 11px;
    }

    .result-item__actions {
        padding: 5px 6px;
        gap: 4px;
    }

    .result-item__badges {
        gap: 3px;
    }

    .result-item__badge {
        width: 32px;
        height: 32px;
    }

    .result-item__view-btn {
        padding: 3px 6px;
        font-size: 10px;
        line-height: 12px;
        height: 22px;
    }
}

@media (max-width: 340px) {
    #search-result-body .result-item {
        flex-wrap: wrap;
    }

    .result-item__photo {
        width: 50px !important;
        min-width: 50px;
        max-height: 50px;
    }

    .result-item__actions {
        flex-basis: 100%;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 6px 10px;
        border-top: 1px solid rgba(107, 114, 128, 0.08);
    }

    .result-item__badges {
        flex-direction: row;
    }

    .result-item__view-btn {
        padding: 3px 8px;
        font-size: 10px;
        height: 22px;
    }
}

/* No-result state */
#no-result {
    text-align: center;
    padding: 30px 20px;
}

#no-result .far.fa-frown {
    color: #d1d5db;
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

#no-result h6 {
    color: #6B7280;
    font-size: 16px;
    font-weight: 400;
}

/* Re-search button */
#result .btn-research {
    border-radius: 12px;
    font-weight: 500;
    font-size: 15px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Interested Teachers Components */
.interested-teacher-link {
    text-decoration: none;
    color: inherit;
}

.interested-teacher-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 113, 34, 0.3) !important;
}

.interested-teachers-section .overflow-auto::-webkit-scrollbar {
    height: 8px;
}

.interested-teachers-section .overflow-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.interested-teachers-section .overflow-auto::-webkit-scrollbar-thumb {
    background: #007122;
    border-radius: 10px;
}

.interested-teachers-section .overflow-auto::-webkit-scrollbar-thumb:hover {
    background: #005f1b;
}

/* ── Tutoring Search Card ── */
/* Reuses .result-item, .result-item__photo, .result-item__info, .result-item__name-row,
   .result-item__meta, .result-item__badges, .result-item__badge, .result-item__view-btn
   from the base search card. Only adds the two-row body layout + description. */

/* Photo: remove max-height so it stretches to match the taller card */
.tutoring-card .result-item__photo {
    max-height: 115px;
}

/* Body replaces the single .result-item__info + .result-item__actions columns */
.tutoring-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 16px;
    gap: 10px;
}

[dir="ltr"] .tutoring-card__body {
    order: 2;
}

[dir="rtl"] .tutoring-card__body {
    order: 2;
}

/* Override result-item__info inside tutoring card: no extra padding, fix RTL direction */
.tutoring-card .result-item__info {
    padding: 0;
}


/* Row 1: info + badges side by side */
/* RTL: info right, badges left (natural row) */
/* LTR: info left, badges right (row-reverse so badges go to the end) */
.tutoring-card__row-top {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

[dir="ltr"] .tutoring-card__row-top {
    flex-direction: row-reverse;
}

/* Divider line between row 1 and row 2 */
.tutoring-card__divider {
    width: 100%;
    height: 0;
    border-top: 1px solid rgba(107, 114, 128, 0.12);
}

/* Row 2: description + view profile button */
/* RTL: description right, button left */
/* LTR: description left, button right */
.tutoring-card__row-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}


.tutoring-card__description {
    flex: 1;
    min-width: 0;
    font-family: 'Rubik', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 20px;
    color: #6B7280;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[dir="rtl"] .tutoring-card__description {
    text-align: right;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .tutoring-card__row-top {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tutoring-card__row-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    [dir="rtl"] .tutoring-card__row-bottom {
        flex-direction: column;
    }

    .tutoring-card__description {
        font-size: 14px;
        line-height: 18px;
    }

    .tutoring-card__body .result-item__view-btn {
        align-self: flex-end;
    }
}