/* ========== Search Page Styles ========== */

/* Override template defaults for search page */
.search-section .widget-1 {
    border: none;
    margin-bottom: 0;
    background: transparent;
}

.search-section .widget-1 .widget-1-body {
    padding: 0;
}

.search-section .widget-1 .subtitle {
    border: none;
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.4;
    padding: 0;
    text-align: left;
}

.search-section .widget-1.widget-check .form-group {
    margin-bottom: 2px;
}

.search-section .widget-1.widget-check .form-group input {
    opacity: 1;
    position: static;
    z-index: auto;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: #e93d87;
}

.search-section .widget-1.widget-check .form-group label {
    font-size: 14px;
    font-weight: 400;
    color: #444;
    padding: 0;
    position: static;
    width: auto;
}

.search-section .widget-1.widget-check .form-group label::before,
.search-section .widget-1.widget-check .form-group label::after {
    display: none !important;
    content: none !important;
}

.search-section .widget-1.widget-check .check-area {
    margin-top: 25px;
    margin-bottom: 15px;
}

.search-section .accordion-button {
    border: none;
    padding: 12px 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-align: left;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-section .accordion-button:focus,
.search-section .accordion-button:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.search-section .accordion-button::after {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 11px;
    color: #888;
    transition: transform 0.25s ease;
    border: none;
    background: none;
    width: auto;
    height: auto;
}

.search-section .accordion-button:not(.collapsed)::after {
    transform: rotate(180deg);
}

.search-section .accordion-button.collapsed::after {
    transform: rotate(0deg);
}

.search-section .accordion-item {
    border: none;
    border-bottom: 1px solid #eee;
    background: transparent;
}

.search-section .accordion-item:last-child {
    border-bottom: none;
}

.search-section .accordion-header {
    margin: 0;
}

.search-section .accordion-collapse {
    border: none;
    display: none;
}

.search-section .accordion-collapse.show {
    display: block;
}

.search-section .accordion-body {
    padding: 0 0 12px 0;
}

.search-section .form-control {
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    padding: 6px 10px;
}

.search-section .form-control:focus {
    border-color: #e93d87;
    box-shadow: none;
}

.search-section .widget-1 .widget-1-body .form-group.d-flex {
    margin-bottom: 0;
}

/* Age Range subtitle override */
.search-section .sf-age-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    text-align: left;
}

/* --- Search Section Layout --- */
.search-section {
    padding: 40px 0 60px;
    background: #f5f5f5;
}

/* --- Filter Sidebar --- */
.search-filter-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px 0 20px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Custom scrollbar for sidebar */
.search-filter-sidebar::-webkit-scrollbar {
    width: 0px;
}

.search-filter-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-filter-sidebar::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.search-filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.search-filter-sidebar .filter-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
    padding-bottom: 0;
    border: none;
}

/* Gender radio / checkbox styling */
.search-filter-sidebar .sf-check-group {
    margin-bottom: 18px;
}

.search-filter-sidebar .sf-check-group .sf-check-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.search-filter-sidebar .sf-check-group .sf-check-item input[type="radio"],
.search-filter-sidebar .sf-check-group .sf-check-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: #e93d87;
    cursor: pointer;
    opacity: 1;
    position: static;
    z-index: auto;
}

.search-filter-sidebar .sf-check-group .sf-check-item label {
    font-size: 14px;
    color: #444;
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    padding: 0;
    position: static;
    width: auto;
}

.search-filter-sidebar .sf-check-group .sf-check-item label::before,
.search-filter-sidebar .sf-check-group .sf-check-item label::after {
    display: none !important;
    content: none !important;
}

/* Age Range inputs */
.search-filter-sidebar .sf-age-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.search-filter-sidebar .sf-age-range input {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    outline: none;
}

.search-filter-sidebar .sf-age-range input:focus {
    border-color: #e93d87;
}

.search-filter-sidebar .sf-age-range span {
    color: #999;
}

/* Height inputs */
.search-filter-sidebar .sf-height-range {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.search-filter-sidebar .sf-height-range input {
    width: 60px;
    padding: 6px 6px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    outline: none;
}

.search-filter-sidebar .sf-height-range input:focus {
    border-color: #e93d87;
}

/* Accordion filter sections */
.search-filter-sidebar .sf-accordion {
    border: none;
}

.search-filter-sidebar .sf-accordion .sf-accordion-item {
    border: none;
    border-bottom: 1px solid #eee;
    background: transparent;
}

.search-filter-sidebar .sf-accordion .sf-accordion-item:last-child {
    border-bottom: none;
}

.search-filter-sidebar .sf-accordion .sf-accordion-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    cursor: pointer;
    text-align: left;
    outline: none;
}

.search-filter-sidebar .sf-accordion .sf-accordion-btn::after {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 11px;
    color: #888;
    transition: transform 0.25s ease;
}

.search-filter-sidebar .sf-accordion .sf-accordion-btn:not(.collapsed)::after {
    transform: rotate(180deg);
}

.search-filter-sidebar .sf-accordion .sf-accordion-body {
    padding: 0 0 12px 0;
}

/* Country search input */
.search-filter-sidebar .sf-search-input {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 10px;
    outline: none;
}

.search-filter-sidebar .sf-search-input:focus {
    border-color: #e93d87;
}

/* Filter action buttons */
.search-filter-sidebar .sf-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    margin-left: -20px;
    margin-right: -20px;
    padding: 16px 20px 16px 20px;
    border-top: 1px solid #eee;
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 10;
    border-radius: 0 0 12px 12px;
}

.search-filter-sidebar .sf-filter-actions .sf-btn-reset {
    flex: 1;
    padding: 9px 16px;
    border: 2px solid #e93d87;
    background: #fff;
    color: #e93d87;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.search-filter-sidebar .sf-filter-actions .sf-btn-reset:hover {
    background: #fef0f5;
}

.search-filter-sidebar .sf-filter-actions .sf-btn-apply {
    flex: 1;
    padding: 9px 16px;
    border: 2px solid #e93d87;
    background: #e93d87;
    color: #fff;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.search-filter-sidebar .sf-filter-actions .sf-btn-apply:hover {
    background: #d63079;
    border-color: #d63079;
}

/* Divider line */
.search-filter-sidebar .sf-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 4px 0;
}

/* --- Top Results Bar --- */
.search-results-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
    gap: 10px;
}

.search-results-topbar .topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-results-topbar .topbar-left .view-toggle {
    display: flex;
    gap: 6px;
}

.search-results-topbar .topbar-left .view-toggle a {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: #888;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
}

.search-results-topbar .topbar-left .view-toggle a.active,
.search-results-topbar .topbar-left .view-toggle a:hover {
    background: #e93d87;
    border-color: #e93d87;
    color: #fff;
}

.search-results-topbar .topbar-left .result-count {
    font-size: 13px;
    color: #666;
}

.search-results-topbar .topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-results-topbar .topbar-right .sort-area {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-results-topbar .topbar-right .sort-area label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    margin: 0;
}

.search-results-topbar .topbar-right .sort-area select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    color: #333;
    background: #fff;
    cursor: pointer;
    -webkit-appearance: auto;
    -moz-appearance: auto;
    appearance: auto;
}

.search-results-topbar .topbar-right .sf-filters-toggle {
    display: none;
    padding: 7px 18px;
    border: 2px solid #e93d87;
    background: #fff;
    color: #e93d87;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    gap: 6px;
    align-items: center;
}

.search-results-topbar .topbar-right .sf-filters-toggle i {
    font-size: 12px;
}

/* --- Profile Result Cards --- */
.search-profile-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: box-shadow 0.2s, transform 0.15s;
}

.search-profile-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Profile image */
.search-profile-card .spc-image {
    position: relative;
    flex-shrink: 0;
}

.search-profile-card .spc-image img {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
}

.search-profile-card .spc-image .spc-badge-new {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #e93d87;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile info */
.search-profile-card .spc-info {
    flex: 1;
    min-width: 0;
}

.search-profile-card .spc-info .spc-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.search-profile-card .spc-info .spc-name {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.search-profile-card .spc-info .spc-verified {
    color: #22c55e;
    font-size: 14px;
}

.search-profile-card .spc-info .spc-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.search-profile-card .spc-info .spc-meta span {
    margin-right: 4px;
}

.search-profile-card .spc-info .spc-meta .spc-sep {
    color: #ccc;
    margin: 0 4px;
}

/* Details grid */
.search-profile-card .spc-info .spc-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 24px;
}

.search-profile-card .spc-info .spc-details .spc-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
}

.search-profile-card .spc-info .spc-details .spc-detail-item i {
    width: 14px;
    text-align: center;
    color: #e93d87;
    font-size: 12px;
}

/* Action buttons */
.search-profile-card .spc-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-left: 24px;
    border-left: 1px solid #eee;
}

.search-profile-card .spc-actions .spc-msg-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 25px;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.search-profile-card .spc-actions .spc-msg-btn i {
    color: #e93d87;
}

.search-profile-card .spc-actions .spc-msg-btn:hover {
    border-color: #e93d87;
    color: #e93d87;
}

.search-profile-card .spc-actions .spc-view-btn {
    display: inline-block;
    padding: 7px 18px;
    background: var(--color-primary);
    color: white;
    border: 2px solid #e93d87;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
}

.search-profile-card .spc-actions .spc-view-btn:hover {
    background: #e93d87;
    color: #fff;
}

/* --- Pagination --- */
.search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    padding: 16px 0;
}

.search-pagination .pagination-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.search-pagination .pagination-area a,
.search-pagination .pagination-area span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.search-pagination .pagination-area a:hover {
    background: #fef0f5;
    border-color: #e93d87;
    color: #e93d87;
}

.search-pagination .pagination-area a.active {
    background: #e93d87;
    color: #fff;
    border-color: #e93d87;
}

.search-pagination .pagination-area span.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Also handle default Laravel pagination if used */
.search-pagination nav {
    display: flex;
    justify-content: center;
}

.search-pagination .pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.search-pagination .page-item .page-link {
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    transition: all 0.2s;
    padding: 0 10px;
    line-height: 1;
    white-space: nowrap;
}

.search-pagination .page-item:first-child .page-link,
.search-pagination .page-item:last-child .page-link {
    border-radius: 20px;
    padding: 0 14px;
    font-size: 13px;
}

.search-pagination .page-item.active .page-link {
    background: #e93d87;
    color: #fff;
    border-color: #e93d87;
}

.search-pagination .page-item .page-link:hover {
    background: #fef0f5;
    border-color: #e93d87;
    color: #e93d87;
}

.search-pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Empty state */
.search-empty-state {
    background: #fff;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.search-empty-state p {
    color: #999;
    font-size: 15px;
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .search-filter-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        z-index: 9999;
        border-radius: 0;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding-top: 20px;
    }

    .search-filter-sidebar.sf-open {
        left: 0;
    }

    .sf-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 9998;
    }

    .sf-sidebar-overlay.sf-open {
        display: block;
    }

    .search-results-topbar .topbar-right .sf-filters-toggle {
        display: flex;
    }

    .search-profile-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .search-profile-card .spc-image {
        align-self: center;
    }

    .search-profile-card .spc-actions {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #eee;
        padding-top: 16px;
        margin-top: 10px;
    }

    .search-profile-card .spc-info .spc-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .search-results-topbar {
        padding: 10px 14px;
    }

    .search-profile-card .spc-image img {
        width: 75px;
        height: 75px;
    }
}

.custom-gender-selection {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    /* Space between the two boxes */
}

.custom-gender-selection input[type="radio"] {
    display: none;
}

.gender-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    border: none;
    background: transparent;
    /* width: 40px;
    height: 40px; */
    cursor: pointer;
    flex: 1;
    font-size: 14px;
    color: #444;
    margin: 0;

}

.gender-card img {
    margin-bottom: 5px;
}

.gender-card img,
.gender-card svg {
    width: 50px;
    height: 50px;
    padding: 2px;
    margin-bottom: 8px;

    border-radius: 50%;
    background-color: #fff;

    object-fit: contain;
    transition: all 0.2s ease;
}

.gender-card:hover img,
.gender-card:hover svg {
    background-color: var(--color-primary);
}

.custom-gender-selection input[type="radio"]:checked+.gender-card img {
    background-color: var(--color-primary);
}