/* Arama sonuçlarının görünürlük sorunu için CSS düzeltmeleri */
body {
    overflow-x: hidden;
}

/* Dark mode stilleri */
.dark-mode {
    color-scheme: dark;
}

.dark-mode-transition {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-container {
    position: relative !important;
    z-index: 1000 !important;
}
#results {
    position: fixed !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    background-color: white !important;
    border-radius: 0.375rem !important;
    border: 1px solid rgba(229, 231, 235, 1) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.dark #results {
    background-color: #000000 !important;
    border-color: rgba(55, 65, 81, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1) !important;
}

.search-result {
    padding: 0.75rem !important;
    border-bottom: 1px solid rgba(229, 231, 235, 1) !important;
    cursor: pointer !important;
}

.dark .search-result {
    border-bottom: 1px solid rgba(55, 65, 81, 1) !important;
}

.search-result:last-child {
    border-bottom: none !important;
}

.search-result:hover {
    background-color: rgba(249, 250, 251, 1) !important;
}

.dark .search-result:hover {
    background-color: rgba(31, 41, 55, 1) !important; /* Darker gray with better contrast against black */
    border-left: 3px solid #38bdf8 !important; /* Blue accent border for better visibility */
    padding-left: 0.6rem !important; /* Adjust padding to account for border */
}

/* Tailwind extensions */
@layer utilities {
    .scrollbar-hide::-webkit-scrollbar {
        display: none;
    }
    .scrollbar-hide {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .price-up {
        color: #10b981;
    }
    .price-down {
        color: #ef4444;
    }
    .dark .price-up {
        color: #34d399;
    }
    .dark .price-down {
        color: #f87171;
    }
    .tab-active {
        color: #0284c7;
        border-color: #0284c7;
    }
    .dark .tab-active {
        color: #38bdf8;
        border-color: #38bdf8;
    }
    .blink {
        animation: blink-animation 1s ease-in-out;
    }
    .favorite-item {
        transition: all 0.3s ease;
    }
    .favorite-item.highlighted {
        box-shadow: 0 0 0 2px #0284c7, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        transform: translateY(-2px);
        background-color: #f0f9ff;
        position: relative;
        z-index: 10;
    }
    .dark .favorite-item.highlighted {
        box-shadow: 0 0 0 2px #38bdf8, 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
        background-color: #172554; /* Darker blue that contrasts better with black */
        border-left: 4px solid #38bdf8; /* Add a side border for better visibility */
    }
    @keyframes blink-animation {
        0% { opacity: 1; }
        50% { opacity: 0.3; }
        100% { opacity: 1; }
    }
    
    /* Fiyat artışı için animasyon */
    .price-up-animation {
        animation: price-up-animation 1s ease-out;
    }
    @keyframes price-up-animation {
        0% { background-color: rgba(16, 185, 129, 0); }
        50% { background-color: rgba(16, 185, 129, 0.3); }
        100% { background-color: rgba(16, 185, 129, 0); }
    }
    /* Dark mode için fiyat artışı animasyonu */
    .dark .price-up-animation {
        animation: dark-price-up-animation 1s ease-out;
    }
    @keyframes dark-price-up-animation {
        0% { background-color: rgba(16, 185, 129, 0); color: inherit; }
        50% { background-color: rgba(16, 185, 129, 0.3); color: #d1fae5; }
        100% { background-color: rgba(16, 185, 129, 0); color: inherit; }
    }
    
    /* Fiyat düşüşü için animasyon */
    .price-down-animation {
        animation: price-down-animation 1s ease-out;
    }
    @keyframes price-down-animation {
        0% { background-color: rgba(239, 68, 68, 0); }
        50% { background-color: rgba(239, 68, 68, 0.3); }
        100% { background-color: rgba(239, 68, 68, 0); }
    }
    /* Dark mode için fiyat düşüşü animasyonu */
    .dark .price-down-animation {
        animation: dark-price-down-animation 1s ease-out;
    }
    @keyframes dark-price-down-animation {
        0% { background-color: rgba(239, 68, 68, 0); color: inherit; }
        50% { background-color: rgba(239, 68, 68, 0.3); color: #fee2e2; }
        100% { background-color: rgba(239, 68, 68, 0); color: inherit; }
    }
    @keyframes fade-in {
        0% { opacity: 0; transform: translateY(-10px); }
        100% { opacity: 1; transform: translateY(0); }
    }
    @keyframes fade-out {
        0% { opacity: 1; transform: translateY(0); }
        100% { opacity: 0; transform: translateY(-10px); }
    }
    @keyframes pulse-animation {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }
    .notification {
        animation: fade-in 0.3s ease-out forwards;
    }
    .notification-exit {
        animation: fade-out 0.3s ease-in forwards;
    }
    .pulse-animation {
        animation: pulse-animation 0.5s ease-in-out infinite;
    }
    .toggle-details svg {
        transition: transform 0.3s ease;
    }
    .subtab-active {
        color: #0284c7;
        border-color: #0284c7;
    }
    .dark .subtab-active {
        color: #38bdf8;
        border-color: #38bdf8;
    }
}