/* Doctor Management Plugin Styles - Fixed Version */
.doctor-management-section {
    font-family: "Be Vietnam Pro", Sans-serif;
}

.doctor-filter-section {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.custom-dropdown {
    position: relative;
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dce4ec;
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
    background-color: #f9fbfd;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.dropdown-btn {
    padding: 12px 15px;
    background-color: #f9fbfd;
    border: 1px solid #dce4ec;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2c3e50;
    font-size: 14px;
}

.dropdown-btn:hover {
    background-color: #f1f7fd;
    border-color: #3498db;
}

.dropdown-btn::after {
    content: "▼";
    font-size: 10px;
    margin-left: 8px;
}

.dropdown-content {
    position: absolute;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    top: 100%;
    left: 0;
    margin-top: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: none;
}

.dropdown-content.active {
    display: block !important;
}

.dropdown-content a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #2c3e50;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #f1f7fd;
    color: #2980b9;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #94a3b8;
    font-weight: bold;
    z-index: 10;
}

.clear-btn:hover {
    color: #dc3545;
}

.doctor-list-section {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.doctor-list-section .section-title {
    font-size: 35px !important;
    font-weight: 900 !important;
    margin-bottom: 30px;
    color: #01A051;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    text-transform: uppercase;
}

.doctor-list-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #F5D701, #01A051);
    border-radius: 3px;
}

.bac-si-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    align-items: stretch;
    padding-top:20px;
}

.bac-si-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 380px; /* Chiều cao tối thiểu đảm bảo hiển thị đủ */
}

.bac-si-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.doctor-image-col {
    padding: 0;
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    height: 500px; /* Chiều cao cố định cho ảnh */
    border-radius: 10px;
}

.doctor-image-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.doctor-info-col {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.doctor-info {
    flex: 1;
    margin-bottom: 15px; /* Đảm bảo có khoảng cách với nút */
}

.doctor-info h4 {
    color: #00542A !important;
    margin-bottom: 12px;
    font-size: 22px !important;
    font-weight: 700;
    line-height: 1.3;
}

.doctor-info h4 a {
    color: #00542A!important;
    text-decoration: none;
    transition: color 0.2s ease;
    text-transform: uppercase;
}

.doctor-info h4 a:hover {
    color: #00542A;
}

.doctor-meta {
    padding-top: 10px;
    font-size: 14px !important;
    color: #000000 !important;
    margin: 8px 0;
    line-height: 1.5;
}

.doctor-meta strong {
    color: #475569;
    min-width: 110px;
    display: inline-block;
}

.doctor-meta div {
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Giới hạn số dòng hiển thị */
.chuyen-khoa-fix,
.khoa-fix {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 42px;
    line-height: 1.4;
}

.doctor-action {
    margin-top: auto; /* Quan trọng: đẩy nút xuống dưới cùng */
    padding-top: 15px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px !important;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: #01A051;
    color: white;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover {
   background: #01A051;
    color: white;
    box-shadow: 0 5px 12px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    display: block;
}

#pagination {
    text-align: center;
    margin-top: 40px;
}

.pagination {
    margin: 0;
    padding: 0;
    display: inline-flex;
}

.pagination ul {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.pagination li {
    margin: 0;
}

.pagination a {
    padding: 10px 16px;
    background: #f8fafc;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 42px;
    display: block;
    text-align: center;
}

.pagination a:hover {
    background: #eef5ff;
    color: #3498db;
    border-color: #bae6fd;
}

.pagination a.active {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border-color: #3498db;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.2);
}

.d-none {
    display: none !important;
}

/* Filter selection display */
#select-chuc-danh, #select-chuyen-khoa {
    display: block;
    margin-top: 8px;
    font-size: 15px;
    color: #ca0000;
    font-weight: 500;
}

/* Placeholder khi không có ảnh */
.doctor-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1976d2;
    font-size: 16px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .bac-si-list {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 992px) {
    .bac-si-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .bac-si-item {
        min-height: 360px;
    }
    
    .doctor-image-col {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .doctor-filter-section {
        padding: 20px;
    }
    
    .doctor-list-section {
        padding: 25px 20px;
    }
    
    .doctor-list-section .section-title {
        font-size: 24px;
        padding-bottom: 30px !important;
    }
    
    .bac-si-item {
        border-radius: 10px;
        min-height: 340px;
    }
    
    .doctor-info h4 {
        font-size: 17px;
    }
    
    .chuyen-khoa-fix,
    .khoa-fix {
        -webkit-line-clamp: 3;
        max-height: 63px;
    }
}

@media (max-width: 576px) {
    .bac-si-list {
        grid-template-columns: 1fr;
    }
    
    .pagination ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .doctor-meta {
        flex-direction: column;
    }
    
    .doctor-meta strong {
        min-width: auto;
        margin-bottom: 4px;
        display: block;
    }
    
    .form-control, .dropdown-btn {
        padding: 10px 12px;
    }
    
    .doctor-image-col {
        height: 160px;
    }
    
    .doctor-info-col {
        padding: 15px;
    }
    
    .doctor-meta div {
        margin-bottom: 8px;
    }
    
    .bac-si-item {
        min-height: 320px;
    }
}