/* Search Functionality */
.search-container {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 45px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Highlight search results */
.highlight {
    background-color: #ffeb3b;
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
}

/* No results message */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    margin: 1rem 0;
    font-size: 1.5rem;
}

.no-results .link-button {
    background: none;
    border: none;
    color: #4a9eff;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 40px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: all 0.2s ease;
    z-index: 10;
}

.favorite-btn:hover {
    color: #ffc107;
    transform: scale(1.2);
}

.favorite-btn.active {
    color: #ffc107;
}

.favorite-btn.active:hover {
    transform: scale(1.1);
}

/* Compare Functionality */
.compare-container {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    padding: 1rem 2rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transition: bottom 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.compare-container.show {
    bottom: 0;
}

.compare-count {
    font-weight: 600;
}

.compare-button {
    background-color: #4a9eff;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.compare-button:hover {
    background-color: #357abd;
    transform: translateY(-1px);
}

.compare-clear {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    padding: 8px;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.compare-clear:hover {
    transform: scale(1.1);
}

/* Compare Panel */
.compare-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    overflow-y: auto;
}

.compare-panel.open {
    display: block;
}

.compare-content {
    background-color: white;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 2rem;
    border-radius: 12px;
    position: relative;
}

.compare-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.compare-close:hover {
    color: #333;
    transform: rotate(90deg);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.compare-table th,
.compare-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.compare-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.compare-table tr:hover {
    background-color: #f8f9fa;
}

/* Card selection for comparison */
.card.compare-selected {
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.2);
}

.compare-checkbox {
    display: none !important;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    cursor: pointer;
}

/* Show checkboxes only when hovering over compare container or in compare mode */
.compare-container.show ~ main .compare-checkbox,
body.compare-mode .compare-checkbox {
    display: block !important;
}

/* Keyboard shortcuts hint */
.keyboard-hints {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    display: none;
    z-index: 1000;
}

.keyboard-hints.show {
    display: block;
}

.keyboard-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.keyboard-hint:last-child {
    margin-bottom: 0;
}

.keyboard-hint kbd {
    background-color: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.875rem;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a9eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-container {
        padding: 0.75rem;
    }
    
    .search-input {
        font-size: 14px;
        padding: 10px 35px 10px 40px;
    }
    
    .compare-container {
        bottom: 10px;
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .compare-content {
        margin: 1rem;
        padding: 1rem;
    }
    
    .keyboard-hints {
        display: none !important;
    }
}

/* Update notification */
.update-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4a9eff;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 3000;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.update-notification button {
    background-color: white;
    color: #4a9eff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.update-notification button:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
} 