/**
 * Search Page Styling
 * Location: /var/www/saafee/public/css/search.css
 * AI-powered hashtag search (card styles in hashtag-card.css)
 */

.search-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
    flex: 1;
}

.search-page-header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 16px;
}

.search-page-header h1 {
    font-size: 1.5em;
    margin-bottom: 6px;
    color: #333;
}

.search-page-header p {
    font-size: 1em;
    color: #666;
}

/* Search Box */
.search-box {
    max-width: 600px;
    margin: 0 auto 24px;
}

.search-form {
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    background: white;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 1em;
    outline: none;
    min-width: 0;
}

.search-form button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #D4A017 0%, #F2C94C 100%);
    color: white;
    border: none;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow 0.2s;
    white-space: nowrap;
    min-height: 44px;
}

.search-form button:hover {
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.4);
}

[dir="rtl"] .search-form input {
    text-align: right;
}

/* Results */
.results-title {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 6px;
}

.results-title span {
    color: #D4A017;
}

.source-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    margin-bottom: 16px;
}

.source-generated {
    background: #e8f5e9;
    color: #2e7d32;
}

.source-cached {
    background: #e3f2fd;
    color: #1565c0;
}

.results-header-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.results-header-bar .results-count {
    font-size: 0.95em;
    color: #666;
}

/* Loading */
.loading-spinner {
    text-align: center;
    padding: 40px 16px;
    display: none;
}

.loading-spinner .spinner {
    border: 4px solid #f0f0f0;
    border-top: 4px solid #D4A017;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: search-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes search-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* States */
.no-results {
    text-align: center;
    padding: 40px 16px;
    color: #999;
    font-size: 1.1em;
    display: none;
}

.error-banner {
    background: #fee;
    color: #c33;
    padding: 15px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    color: #D4A017;
    text-decoration: none;
    font-weight: 500;
    min-height: 44px;
}

.back-link:hover {
    text-decoration: underline;
}

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

@media (min-width: 768px) {
    .search-container {
        padding: 20px;
    }

    .search-page-header {
        margin-bottom: 30px;
        padding-top: 20px;
    }

    .search-page-header h1 {
        font-size: 2.2em;
        margin-bottom: 8px;
    }

    .search-page-header p {
        font-size: 1.05em;
    }

    .search-box {
        margin: 0 auto 30px;
    }

    .search-form input {
        padding: 14px 24px;
    }

    .search-form button {
        padding: 14px 28px;
    }

    .results-title {
        font-size: 1.3em;
    }
}
