/**
 * CRYPTO TEK AI - TRADE SEARCH STYLES
 * Multi-Exchange Coin Search UI
 * 🎯 ŞİMDİLİK DORMANT - İLERİDE AKTİF EDİLECEK
 */

/* ==================== SEARCH CONTAINER ==================== */

.trade-search-container {
    margin: 0 0 16px 0;
    padding: 0;
}

/* Override card styles inside trade-search for full-width look */
.trade-search-container .card {
    border-radius: 0;
    margin: 0;
    padding: 16px;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== EXCHANGE SELECTOR ==================== */

.exchange-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-exchange-selector {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: capitalize;
}

.btn-exchange-selector:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-exchange-selector.active {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    border-color: #FF6B35;
}

/* ==================== SEARCH INPUT ==================== */

#tradeSearchInput {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
}

#tradeSearchInput:focus {
    outline: none;
    border-color: #FF6B35;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

/* Mobile keyboard - sticky search card */
.trade-search-container.search-focused .card {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg,
        rgba(26, 26, 46, 1) 0%,
        rgba(22, 33, 62, 0.98) 100%);
    border-bottom: 1px solid rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#tradeSearchInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== SEARCH RESULTS ==================== */

#tradeSearchResults {
    margin-top: 16px;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.btn-select-coin {
    padding: 8px 16px;
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-select-coin:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* ==================== CATEGORY MODAL ==================== */

.category-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.2s;
}

.category-modal-overlay.show {
    display: flex;
}

.category-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s;
}

.category-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.category-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.category-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.category-modal-body {
    padding: 0;
}

/* ==================== CATEGORY CHECKBOXES ==================== */

.category-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.category-checkbox-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.category-checkbox-item:active {
    transform: scale(0.98);
}

.category-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    margin-top: 2px;
    z-index: 1;
    position: relative;

    /* Custom checkbox styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition: all 0.2s ease;
}

.category-checkbox-item input[type="checkbox"]:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #FF6B35;
}

.category-checkbox-item input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    border-color: #FF6B35;
}

.category-checkbox-item input[type="checkbox"]:checked::after {
    content: "✓";
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.category-checkbox-item input[type="checkbox"]:focus {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

/* ==================== LOADING SPINNER ==================== */

.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #FF6B35;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .category-modal {
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 80vh;
    }

    .exchange-selector {
        gap: 6px;
    }

    .btn-exchange-selector {
        padding: 6px 12px;
        font-size: 11px;
    }
}
