/**
 * Search Results Page Styles
 * Extracted from search/index.php for cacheability
 */
/* Modern Search Results Styling */
body {
    background: white !important;
}

#header {
    background: url('/images/header-bg.jpg') no-repeat;
    background-size: cover;
}

.search-hero {
    border-bottom: 1px solid #dee2e6;
    padding: 30px 0 0 0;
    margin-bottom: 30px;
}

.search-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-hero h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #00498f;
}

.search-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 15px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.search-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.search-stat-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-stat-icon svg {
    width: 16px;
    height: 16px;
    fill: #00498f;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background: white;
}

.search-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

.search-main {
    min-height: 400px;
}

.search-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Profile Match Card */
.profile-match {
    background: linear-gradient(135deg, #2c5282 0%, #4a7bb7 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 73, 143, 0.3);
    padding: 40px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.profile-match-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-match-image {
    position: relative;
    flex-shrink: 0;
}

.profile-match-image img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.profile-match-info {
    flex: 1;
}

.profile-match-name {
    font-size: 36px;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    transition: opacity 0.2s ease;
    line-height: 1.2;
}

.profile-match-name:hover {
    opacity: 0.9;
    color: white !important;
}

.profile-match-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
    font-weight: 600;
}

.profile-match-username {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 16px;
    display: block;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.profile-match-username:hover {
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.9) !important;
}

.profile-match-username:visited {
    color: rgba(255, 255, 255, 0.9) !important;
}

.profile-match-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 18px;
}

.profile-match-meta img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* AI Result Card */
.ai-result {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #e3e8ff;
    position: relative;
    overflow: hidden;
}

.ai-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ai-result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.ai-result-title {
    flex: 1;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.ai-badge svg {
    width: 14px;
    height: 14px;
    fill: white;
}

.ai-result h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.ai-result h2 a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ai-result h2 a:hover {
    color: #667eea;
}

.ai-result p {
    margin: 0 0 12px 0;
    line-height: 1.7;
    color: #444;
    font-size: 15px;
}

.ai-result .ai-url {
    font-size: 14px;
    word-break: break-all;
}

.ai-result .ai-url a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ai-result .ai-url a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.ai-disclaimer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-left: -30px;
    margin-right: -30px;
    margin-bottom: -30px;
    padding-left: 30px;
    padding-right: 30px;
}

.ai-disclaimer svg {
    width: 16px;
    height: 16px;
    fill: #667eea;
    flex-shrink: 0;
}

/* Search Result Cards */
.result-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.result-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.result-card.premium {
    border-left-color: #ffd700;
    border-left-width: 5px;
    background: linear-gradient(135deg, #fffef7 0%, #ffffff 50%, #fffef7 100%);
    position: relative;
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.15);
}

.result-card.premium:hover {
    box-shadow: 0 5px 25px rgba(255, 215, 0, 0.25);
}

.result-card.basic {
    border-left-color: #e9ecef;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    flex-shrink: 0;
}

.premium-badge svg {
    width: 14px;
    height: 14px;
    fill: #000;
}

.result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
}

.result-header-left {
    flex: 1;
}

.result-card h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.result-card h3 a {
    color: #00498f;
    text-decoration: none;
}

.result-card h3 a:hover {
    color: #003366;
    text-decoration: underline;
}

.result-content {
    margin-bottom: 15px;
}

.result-content.has-image {
    display: block;
}

.result-image {
    float: left;
    margin-right: 20px;
    margin-bottom: 15px;
}

.result-image img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-description {
    color: #555;
    line-height: 1.7;
    font-size: 15px;
    overflow: hidden;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    clear: both;
}

.result-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #777;
}

.result-meta-item a {
    color: #777;
    text-decoration: none;
}

.result-meta-item a:hover {
    color: #00498f;
}

.result-flag {
    width: 20px;
    height: 15px;
    display: inline-block;
    vertical-align: middle;
}

/* Sidebar Styling */
.sidebar-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 20px;
}

.sidebar-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section li {
    margin-bottom: 12px;
}

.sidebar-section li:last-child {
    margin-bottom: 0;
}

.sidebar-section a {
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-section a:hover {
    background: #f8f9fa;
    color: #00498f;
    padding-left: 16px;
}

.sidebar-section a::before {
    content: "›";
    font-size: 18px;
    font-weight: bold;
    color: #00498f;
}

/* View Toggle Styles */
.view-toggle {
    display: flex;
    gap: 8px;
}

.view-toggle-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    border-color: #00498f;
    color: #00498f;
}

.view-toggle-btn.active {
    background: #00498f;
    border-color: #00498f;
    color: white;
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
}

/* List View Styles */
.search-results.list-view .result-card {
    padding: 12px 0;
    margin-bottom: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    border-left: none;
    border-bottom: 1px solid #eee;
}

/* Premium cards keep card styling in list view */
.search-results.list-view .result-card.premium {
    background: linear-gradient(135deg, #fffef7 0%, #ffffff 50%, #fffef7 100%);
    border-left: 5px solid #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 15px;
    border-bottom: none;
}

.search-results.list-view .result-card.premium .result-image {
    display: block !important;
    float: left !important;
    margin: 0 15px 10px 0 !important;
}

.search-results.list-view .result-card.premium .result-image img {
    width: 100px !important;
    height: 75px !important;
}

.search-results.list-view .result-card.premium .result-description {
    -webkit-line-clamp: 2;
}

.search-results.list-view .result-card.premium .result-meta .result-meta-item {
    display: flex !important;
}

.search-results.list-view .result-card:last-child {
    border-bottom: none;
}

.search-results.list-view .result-card h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.search-results.list-view .result-header {
    margin-bottom: 4px;
}

.search-results.list-view .result-content {
    display: block !important;
    margin-bottom: 6px;
}

.search-results.list-view .result-image {
    display: none !important;
}

.search-results.list-view .result-description {
    font-size: 13px;
    line-height: 1.4;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-results.list-view .result-meta {
    padding-top: 4px;
    margin-top: 0;
    border-top: none;
    font-size: 12px;
    gap: 12px;
}

/* Hide category, more info, report this in list view */
.search-results.list-view .result-meta .result-meta-item:nth-child(n+2) {
    display: none;
}

.search-results.list-view .premium-badge {
    font-size: 10px;
    padding: 2px 6px;
}

/* No Results */
.no-results {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 40px;
    text-align: center;
}

.no-results h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.no-results p {
    color: #666;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .search-layout {
        grid-template-columns: 1fr;
    }

    .search-sidebar {
        position: static;
    }

    .result-content {
        flex-direction: column;
    }

    .result-image img {
        width: 100%;
        height: auto;
    }
}

/* Easter Egg Styling */
.easter-egg {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }

    .search-layout {
        flex-direction: column !important;
    }

    .search-main {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 30px !important;
    }

    .search-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    .search-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    .search-hero-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    /* Profile Match Mobile Styles */
    .profile-match {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }

    .profile-match-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 20px !important;
    }

    .profile-match-image img {
        width: 100px !important;
        height: 100px !important;
    }

    .profile-match-info {
        text-align: center !important;
    }

    .profile-match-name {
        font-size: 24px !important;
    }

    .profile-match-username {
        font-size: 16px !important;
    }

    .profile-match-meta {
        justify-content: center !important;
        font-size: 14px !important;
    }

    /* Result Cards Mobile */
    .result-card {
        padding: 15px !important;
        margin: 0 0 15px 0 !important;
    }

    .result-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .premium-badge {
        align-self: flex-start !important;
    }

    .result-content.has-image {
        display: block !important;
    }

    .result-image {
        float: none !important;
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }
    
    .result-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 300px !important;
    }

    .result-meta {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .search-stats {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .pagination {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .pagination a, .pagination span {
        padding: 6px 10px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .search-container {
        padding: 0 15px !important;
    }

    .search-hero-content {
        padding: 0 15px !important;
    }

    .search-hero h1 {
        font-size: 20px !important;
    }

    .profile-match {
        padding: 15px !important;
    }

    .profile-match-image img {
        width: 80px !important;
        height: 80px !important;
    }

    .profile-match-name {
        font-size: 20px !important;
    }

    .profile-match-username {
        font-size: 14px !important;
    }

    .profile-match-meta {
        font-size: 13px !important;
    }

    .profile-match-meta img {
        width: 20px !important;
        height: 14px !important;
    }

    .result-card h3 {
        font-size: 18px !important;
    }

    .result-description {
        font-size: 14px !important;
    }

    .sidebar-section {
        padding: 20px !important;
    }
}

@media (max-width: 360px) {
    .search-hero h1 {
        font-size: 18px !important;
    }

    .profile-match-image img {
        width: 70px !important;
        height: 70px !important;
    }

    .profile-match-name {
        font-size: 18px !important;
    }

    .profile-match-username {
        font-size: 13px !important;
    }

    .result-card {
        padding: 12px !important;
    }

    .result-card h3 {
        font-size: 16px !important;
    }

    .result-description {
        font-size: 13px !important;
    }

    .pagination a, .pagination span {
        padding: 5px 8px !important;
        font-size: 13px !important;
    }
}

<?php if(strtolower($keyword) == "wonky") { echo ".wonky {transform-origin: bottom right; transform: skewY(4deg);margin-top: 95px;}"; } ?>

/* Easter egg */
.wonky {transform-origin: bottom right; transform: skewY(4deg); margin-top: 95px;}
