/**
 * Search Page Styles
 * OnlySeek - Free OnlyFans Search
 * Last Updated: December 24, 2025
 */

/* ====================
   Utility Classes
   ==================== */

/* OnlyGuider-style search results header */
.bg-primary-10 {
    background-color: rgba(59, 130, 246, 0.1);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.text-primary {
    color: #3b82f6;
}

.text-gradient-accent {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.bg-primary {
    background-color: #3b82f6;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Utility classes for OnlyGuider design */
.mb-8 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.mb-4 { margin-bottom: 1rem; }
.w-3 { width: 0.75rem; }
.h-3 { height: 0.75rem; }
.text-xs { font-size: 0.75rem; }
.font-medium { font-weight: 500; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.mb-6 { margin-bottom: 1.5rem; }
.text-gray-900 { color: #111827; }
.break-words { word-wrap: break-word; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-center { justify-content: center; }
.gap-3 { gap: 0.75rem; }
.text-gray-600 { color: #4b5563; }
.w-2 { width: 0.5rem; }
.h-2 { height: 0.5rem; }
.bg-green-500 { background-color: #10b981; }
.text-sm { font-size: 0.875rem; }

/* ====================
   Search Page Layout
   ==================== */

/* Search Page Wrapper with Sidebar */
.search-page-wrapper {
    display: flex;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    align-items: flex-start;
}

@media (min-width: 1920px) {
    .search-page-wrapper {
        max-width: 1500px;
        gap: 1.25rem;
    }
    
    .search-main-content .onlyfinder-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ====================
   Left Sidebar Filter
   ==================== */

.search-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(30, 174, 219, 0.15);
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.search-sidebar::-webkit-scrollbar {
    display: none;
}

@media (min-width: 1025px) {
    .search-sidebar {
        display: block !important;
    }
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #7dd3fc;
    background: transparent;
}

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0c4a6e;
    margin: 0;
    background: transparent;
}

.sidebar-close {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #6b7280;
}

.sidebar-close:hover {
    color: #111827;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Filter Sections */
.filter-section {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0c4a6e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #7dd3fc;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #0c4a6e;
    background: #ffffff;
    transition: all 0.2s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #1eaedb;
    box-shadow: 0 0 0 3px rgba(30, 174, 219, 0.15);
}


.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}


.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.checkbox-label:hover {
    background-color: #f9fafb;
}

.checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: #1eaedb;
}

.checkbox-label span {
    font-size: 0.875rem;
    color: #0c4a6e;
}

.btn-clear-filters {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #1eaedb 0%, #0ea5e9 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(30, 174, 219, 0.3);
}

.btn-clear-filters:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 174, 219, 0.4);
}

/* ====================
   Main Content
   ==================== */

.search-main-content {
    flex: 1;
    min-width: 0;
    padding: 0 !important;
}

.search-main-content main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.search-main-content .container-main {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Profile Grid Adjustments */
.search-main-content .onlyfinder-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.search-main-content .onlyfinder-card {
    max-width: 100%;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.search-main-content .onlyfinder-card:hover {
    transform: translateY(-4px);
}

.search-main-content .onlyfinder-image {
    height: 200px;
    min-height: 200px;
}

.search-main-content .onlyfinder-image img {
    height: 100%;
    object-fit: cover;
}

.search-main-content .onlyfinder-name {
    font-size: 0.875rem;
    line-height: 1.2;
}

.search-main-content .onlyfinder-username {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.search-main-content .onlyfinder-bio {
    font-size: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
    min-height: 2.6em;
}

.search-main-content .onlyfinder-stats {
    gap: 0.5rem;
}

.search-main-content .onlyfinder-stat-number {
    font-size: 0.8rem;
}

.search-main-content .onlyfinder-stat-label {
    font-size: 0.65rem;
}

.search-main-content .onlyfinder-content {
    padding: 0.875rem;
}

.search-main-content .onlyfinder-price {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.search-main-content .onlyfinder-sponsored {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Header spacing */
.search-main-content .small-text {
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
    display: block;
}

.search-main-content .onlyfinder-section-title {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.search-main-content .onlyfinder-section {
    margin: 0;
    padding-top: 0;
}

/* Search header adjustments */
.search-main-content .mb-8 {
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.search-main-content main {
    width: 100%;
}

/* ====================
   Mobile Filter Toggle
   ==================== */

.mobile-filter-toggle {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 0.875rem 1rem;
    z-index: 99;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #1eaedb 0%, #0ea5e9 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-filter-toggle:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ====================
   Load More Button
   ==================== */

.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #1eaedb 0%, #0ea5e9 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 174, 219, 0.3);
    border: none;
    cursor: pointer;
}

.btn-load-more:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 174, 219, 0.4);
}

.btn-load-more svg {
    transition: transform 0.3s ease;
}

.btn-load-more:hover svg {
    transform: translateY(3px);
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-load-more:disabled:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(30, 174, 219, 0.3);
}

.load-more-info {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* ====================
   Responsive Design
   ==================== */

/* Desktop Large (1440px+) */
@media (max-width: 1440px) {
    .search-main-content .onlyfinder-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .search-page-wrapper {
        max-width: 1100px;
    }
}

/* Desktop (1280px) */
@media (max-width: 1280px) {
    .search-sidebar {
        width: 240px;
    }
    
    .search-page-wrapper {
        gap: 1rem;
    }
}

/* Tablet (1024px) */
@media (max-width: 1024px) {
    .search-page-wrapper {
        flex-direction: column;
        padding: 0 !important; /* Remove all side padding */
        padding-bottom: 100px !important; /* Keep bottom padding for fixed filter button */
    }
    
    .search-main-content {
        width: 100%;
        padding: 0 !important;
    }
    
    .search-main-content main {
        padding: 0 !important; /* Remove default padding */
    }
    
    /* Add padding only to header elements */
    .search-main-content .onlyfinder-section-title,
    .search-main-content .small-text,
    .search-main-content .mb-8 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Grid should have minimal padding */
    .search-main-content .onlyfinder-grid {
        padding: 0 0.5rem !important;
    }
    
    .load-more-container {
        padding: 0 1rem !important;
    }
    
    .search-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 320px;
        height: 100vh;
        max-height: 100vh;
        z-index: 1001;
        transform: translateX(-100%);
        border-radius: 0;
        border: none;
        border-right: 1px solid #e5e7eb;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8rem; /* Extra padding at bottom for scrolling to Clear All button */
    }
    
    .search-sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .search-main-content .onlyfinder-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-filter-toggle {
        display: block;
    }
}

/* Mobile (640px) */
@media (max-width: 640px) {
    .search-sidebar {
        width: 280px;
    }
    
    .search-main-content .onlyfinder-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem; /* Reduced gap for wider boxes */
        padding: 0 0.25rem !important; /* Minimal side padding for grid */
    }
    
    .search-page-wrapper {
        padding: 0 !important;
        padding-bottom: 100px !important;
    }
    
    .search-main-content main {
        padding: 0 !important;
    }
    
    /* Header elements get padding */
    .search-main-content .onlyfinder-section-title,
    .search-main-content .small-text,
    .search-main-content .mb-8 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    .load-more-container {
        padding: 0 0.75rem !important;
    }
    
    .btn-load-more {
        padding: 0.875rem 2rem;
        font-size: 0.9375rem;
    }
}

/* Mobile Small (480px) */
@media (max-width: 480px) {
    .search-main-content .onlyfinder-grid {
        /* ORIGINAL: grid-template-columns: 1fr; (1 column on small mobile) */
        /* CHANGED TO: 2 columns on all mobile devices */
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem !important; /* Reduced gap for wider boxes on small screens */
        padding: 0 0.15rem !important; /* Absolute minimal side padding for grid */
    }
    
    .search-page-wrapper {
        padding: 0 !important;
        padding-bottom: 100px !important;
    }
    
    .search-main-content main {
        padding: 0 !important;
    }
    
    /* Header elements get padding */
    .search-main-content .onlyfinder-section-title,
    .search-main-content .small-text,
    .search-main-content .mb-8 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .load-more-container {
        padding: 0 0.5rem !important;
    }
}


/* Remove any conflicting container styles */
.search-page-wrapper + * {
    max-width: none;
}
