/* ========== Search Popup ========== */
.search-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.search-popup-overlay.active {
    display: block;
}

.search-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    animation: slideDown 0.4s ease;
}

.search-popup.active {
    display: block;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.search-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-popup-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

.search-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-popup-close:hover {
    background: #ecf0f1;
    color: #e74c3c;
    transform: rotate(90deg);
}

.search-popup-form {
    display: flex;
    gap: 10px;
}

.search-popup-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.search-popup-input:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

.search-popup-button {
    padding: 14px 24px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-popup-button:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.search-popup-button:active {
    transform: translateY(0);
}

/* ========== الوضع الليلي ========== */
body.dark-mode .search-popup {
    background: #2c2c2c;
}

body.dark-mode .search-popup-title {
    color: #ecf0f1;
}

body.dark-mode .search-popup-input {
    background: #1a1a1a;
    border-color: #3a3a3a;
    color: #ecf0f1;
}

body.dark-mode .search-popup-input:focus {
    border-color: #2ecc71;
}

body.dark-mode .search-popup-close:hover {
    background: #3a3a3a;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
    .search-popup {
        width: 95%;
        padding: 20px;
    }
    
    .search-popup-title {
        font-size: 18px;
    }
    
    .search-popup-form {
        flex-direction: column;
    }
    
    .search-popup-button {
        width: 100%;
        justify-content: center;
    }
}
