/* Search page specific styling - integrates with app.css */
:root {
    --search-primary: #1a73e8;
    --search-primary-hover: #1967d2;
    --search-text: #202124;
    --search-light-text: #5f6368;
    --search-url: #0d652d;
    --search-highlight: rgba(26, 115, 232, 0.15);
    --search-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --search-transition: 0.2s ease-in-out;
}

.content-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-light);
}

/* Search container with app header */
.search-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Search form styling */
.search-form {
    position: relative;
    margin: 1.5rem 0 1rem;
}

.search-input-wrapper {
    position: relative;
}

.search-form .form-control {
    height: 50px;
    border-radius: var(--border-radius-pill);
    border: 1px solid var(--border-color);
    padding: 0 4rem 0 1.5rem;
    font-size: 1rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    background-color: white;
}

.search-form .form-control:hover {
    box-shadow: var(--shadow-medium);
}

.search-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(51, 102, 153, 0.1);
}

/* Clear and search buttons */
.btn-clear {
    position: absolute;
    right: 3.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
}

.btn-clear:hover {
    color: var(--text);
    transform: translateY(-50%) scale(1.1);
}

.search-button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    background: var(--primary);
    border: none;
    padding: 0 1.5rem;
    border-radius: var(--border-radius-pill);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: var(--primary-dark);
    transform: translateX(2px);
}

/* Search results styling */
.search-content {
    padding: 0.5rem 0 2rem;
}

.results-stats {
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.875rem;
}

.search-result {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 0.8rem 1rem; /* Reduced padding */
    margin-bottom: 0.75rem; /* Reduced margin */
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.search-result:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-light);
}

.search-result-favicon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    vertical-align: middle; /* Align with text */
    border-radius: 2px; /* Optional: slightly rounded corners for favicons */
}

.search-result-url {
    color: var(--search-url);
    margin-bottom: 0.15rem; /* Reduced margin */
    display: flex;
    align-items: center;
    font-size: 0.8rem; /* Reduced font size */
    word-break: break-all;
}

.search-result-title {
    font-size: 1.1rem; /* Reduced font size */
    margin: 0.15rem 0 0.3rem; /* Adjusted margins */
    line-height: 1.3;
    font-weight: 500;
    display: flex; /* To align favicon and title */
    align-items: center; /* To align favicon and title */
}

.search-result-title a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.search-result-title a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.search-result-description {
    color: var(--text);
    font-size: 0.85rem; /* Reduced font size */
    line-height: 1.5;
    margin-top: 0.3rem; /* Reduced margin */
    margin-bottom: 0.3rem; /* Added margin for spacing before URL */
}

/* Highlighting */
.search-query-highlight {
    background-color: var(--search-highlight);
    padding: 0 2px;
    border-radius: 2px;
}

/* Related searches section */
#related-searches {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.related-searches-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 1rem;
}

.suggestion-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-pill {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    padding: 0.5rem 1rem;
    color: var(--primary);
    font-size: 0.875rem;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-pill:hover {
    background-color: var(--hover-light);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-container {
        padding: 0 0.75rem;
    }
    
    .search-form .form-control {
        height: 45px;
        font-size: 0.95rem;
    }
    
    .search-result {
        padding: 1rem;
    }
    
    .search-result-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .search-container {
        padding: 0 0.5rem;
    }
    
    .search-form .form-control {
        height: 42px;
        font-size: 0.9rem;
        padding: 0 3.5rem 0 1rem;
    }
    
    .search-button {
        padding: 0 1rem;
    }
    
    .btn-clear {
        right: 3rem;
    }
    
    .search-result-title {
        font-size: 1rem;
    }
}