/* تصميم شاشة البحث */
.csc-container {
    max-width: 900px;
    margin: 100px auto;
    padding: 40px;
    direction: rtl;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    font-family: 'Tajawal', 'Noto Sans Arabic', sans-serif;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.csc-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    z-index: 0;
}

.csc-header {
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.csc-title {
    font-size: 2.8rem;
    color: #2b2d42;
    margin-bottom: 15px;
    font-weight: 700;
}

.csc-description {
    font-size: 1.3rem;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* شاشة البحث */
.csc-search-screen {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

.csc-search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 30px;
}

#csc-client-search {
    width: 100%;
    padding: 20px 25px;
    font-size: 1.3rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Tajawal', 'Noto Sans Arabic', sans-serif;
}

#csc-client-search:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.2);
}

#csc-client-search::placeholder {
    color: #a0a0a0;
    font-weight: 300;
}

.csc-search-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0a0;
    font-size: 1.5rem;
}

.csc-search-hint {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 40px;
}

/* قائمة العملاء */
.csc-results-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 30px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: none;
}

.csc-client-item {
    padding: 15px 25px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.csc-client-item:hover {
    background: #f8f9ff;
}

.csc-client-item:last-child {
    border-bottom: none;
}

.csc-client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4361ee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.csc-client-info {
    flex-grow: 1;
}

.csc-client-item-name {
    font-size: 1.2rem;
    color: #2b2d42;
    margin-bottom: 5px;
    font-weight: 600;
}

.csc-client-item-meta {
    display: flex;
    gap: 15px;
    color: #6c757d;
    font-size: 0.9rem;
}

.csc-client-item-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.csc-client-item-featured {
    color: #d4af37;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* منطقة عرض النتائج */
.csc-result-container {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: right;
    min-height: 300px;
    position: relative;
    z-index: 1;
}

.csc-client-name {
    font-size: 2.2rem;
    color: #2b2d42;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 700;
}

.csc-client-summary {
    color: #4a4a4a;
    line-height: 1.9;
    font-size: 1.2rem;
    min-height: 200px;
    text-align: justify;
}

.csc-typing-cursor::after {
    content: "|";
    animation: csc-blink 1s infinite;
    font-weight: bold;
    color: #4361ee;
    margin-right: 3px;
}

@keyframes csc-blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.csc-search-again {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 35px;
    background: #f0f4f8;
    color: #4361ee;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #4361ee;
    font-size: 1.1rem;
    cursor: pointer;
    font-family: 'Tajawal', 'Noto Sans Arabic', sans-serif;
}

.csc-search-again:hover {
    background: #4361ee;
    color: white;
    transform: translateY(-3px);
}

/* مؤشر التحميل */
.csc-loading {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.csc-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4361ee;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: csc-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes csc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* رسالة عدم وجود نتائج */
.csc-no-results {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.3rem;
    color: #6c757d;
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .csc-container {
        margin: 50px 20px;
        padding: 30px 20px;
    }
    
    .csc-title {
        font-size: 2.2rem;
    }
    
    .csc-description {
        font-size: 1.1rem;
    }
    
    .csc-search-screen, .csc-result-container {
        padding: 25px;
    }
    
    #csc-client-search {
        font-size: 1.1rem;
        padding: 15px 20px;
    }
    
    .csc-client-name {
        font-size: 1.8rem;
    }
    
    .csc-client-summary {
        font-size: 1.1rem;
    }
    
    .csc-client-item {
        padding: 12px 15px;
    }
    
    .csc-client-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .csc-client-item-name {
        font-size: 1.1rem;
    }
}