/**
 * Хайлтын хэсгийн стилийн тодорхойлолт
 */

/* Хайлтын карт */
.search-container {
    border: none;
    border-radius: 0px;

    margin-bottom: 30px;
    margin-top: 0px;
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    background-color: #fefefe ;
}

/* Хайлтын форм */
.search-form-container {
    padding: 20px;
       background-color: #fefefe ;
}

/* Хайлтын талбар */
.search-input-group {
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border-radius: 0px;
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.search-input {
    border-radius: 0px 0 0 0px;
    border: 1px solid #e6e6e6;
    border-right: none;
    padding-left: 20px;
    height: 48px;
    font-size: 15px;
}

.search-button {
    border-radius: 0 0px 0px 0;
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    border: none;
    padding: 0 25px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.search-button:hover {
    background: linear-gradient(135deg, #3a40c0, #7a7ff9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.search-button-icon {
    font-size: 18px;
    margin-right: 0.5rem;
}

.clear-button {
    border-radius: 0%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e0e0e0;
    margin-left: 0.5rem;
    padding: 0;
    transition: all 0.3s ease;
    align-self: center;
}

.clear-button:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* Хайлтын үр дүнгийн хэсэг */
.search-results-container {
    margin-top: 25px;
    border-top: 0px solid #f0f0f0;
    padding-top: 25px;
}

@media (max-width: 768px) {
    .search-results-container {
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* Алерт хэсэг */
.search-alert-warning {
    background-color: #fff8e6;
    border-left: 4px solid #ffc107;
    border-radius: 0px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.search-alert-info {
    background-color: #f8f9fa;
    border-left: 4px solid #17a2b8;
    border-radius: 0px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.search-alert-icon {
    font-size: 24px;
    margin-right: 1rem;
}

/* Категорийн хэсэг */
.search-category {
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .category-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .category-header .view-category-button {
        margin-top: 10px;
    }
}

.category-header {
    text-align: center;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 0px;
}

.category-title {
    font-weight: 600;
    color: #333;
    margin: 0;
    display: inline-block;
    text-align: center;
}

.access-badge {
    border-radius: 0px;
    padding: 5px 10px;
    margin-right: 0.5rem;
    color: white;
}

.access-granted {
    background-color: #7b85e1;
}

.access-denied {
    background-color: #dc3545;
}

.items-count-badge {
    background: #e9ecef;
    color: #666;
    font-size: 12px;
    font-weight: 400;
    padding: 5px 10px;
    border-radius: 0px;
    margin-left: 0.5rem;
}

.view-category-button {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: white;
    border: none;
    border-radius: 0px;
    padding: 6px 15px;
    font-size: 13px;
    font-weight: 500;
}

.view-category-button:hover {
    background: linear-gradient(135deg, #3a40c0, #7a7ff9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Хятад ханз шинэ ID */
#chinese-hanzi-clean {
    margin: 0 0 15px 0;
    font-weight: 700;
    font-size: 64px;
    color: #000;
    text-align: center;
    line-height: 1.2;
    background: white !important;
    background-color: white !important;
    background-image: none !important;
    position: relative;
    z-index: 2;
}

/* Ханз арын загвар блок */
#chinese-hanzi-clean::before,
#chinese-hanzi-clean::after {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* Ханз доторх хайлтын тэмдэглэгээ */
#chinese-hanzi-clean mark {
    background-color: rgba(78, 84, 200, 0.2) !important;
    color: inherit !important;
}

.simple-card {
    background-color: white !important;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-radius: 0px;
    padding: 20px 15px;
    width: 100%;
    max-width: 240px;
    text-align: center;
}
mark {
    background: rgba(78, 84, 200, 0.2);
    color: inherit;
    padding: 0 2px;
    border-radius: 0px;
    animation: highlight 1.5s ease-in-out;
}

@keyframes highlight {
    0% { background-color: rgba(78, 84, 200, 0.4); }
    100% { background-color: rgba(78, 84, 200, 0.2); }
}

/* Responsive */
@media (max-width: 768px) {
    .search-input-group {
        max-width: 95%;
    }
    
    .search-form-container {
        padding: 15px 10px;
    }
    
    .search-button {
        padding: 0 15px;
    }
    
    .clear-button {
        margin-left: 5px;
        padding: 6px 10px;
    }
}