/* 医生目录页面样式 */

.doctors-page {
    background: #f8fafc;
    min-height: 100vh;
}

/* 医生搜索区域 */
.doctor-search-section {
    background: white;
    padding: 40px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.search-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-header h1 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 28px;
}

.search-header p {
    color: #6b7280;
    font-size: 16px;
}

.doctor-search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.search-input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    outline: none;
}

.search-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #4338ca;
}

/* 布局 */
.doctors-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* 筛选侧边栏 */
.doctors-filters {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.filters-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-filters {
    color: #4f46e5;
    text-decoration: none;
    font-size: 14px;
}

.clear-filters:hover {
    text-decoration: underline;
}

.filter-group {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group h4 {
    margin: 0 0 15px 0;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-option:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.filter-option.active {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 500;
}

.filter-option .count {
    font-size: 12px;
    color: #9ca3af;
}

/* 推荐医生 */
.recommended-doctors {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommended-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    transition: all 0.2s;
}

.recommended-item:hover {
    border-color: #e5e7eb;
    background: #fafafa;
}

.recommended-item .doctor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.recommended-item .doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-item .avatar-placeholder {
    width: 50px;
    height: 50px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
}

.recommended-item .doctor-info h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.recommended-item .doctor-info h5 a {
    color: #1f2937;
    text-decoration: none;
}

.recommended-item .doctor-info h5 a:hover {
    color: #4f46e5;
}

.recommended-item .doctor-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 5px;
}

.recommended-item .doctor-meta span {
    font-size: 12px;
    color: #6b7280;
}

.recommended-item .doctor-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
}

.recommended-item .doctor-rating i {
    color: #fbbf24;
}

.recommended-item .doctor-rating .far {
    color: #d1d5db;
}

/* 主内容区 */
.doctors-main {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* 搜索结果头部 */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.results-info h2 {
    margin: 0 0 5px 0;
    color: #1f2937;
    font-size: 20px;
}

.results-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.results-sort select {
    padding: 8px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    font-size: 14px;
}

/* 医生列表 */
.doctors-list {
    padding: 30px;
}

.doctor-card {
    display: flex;
    gap: 20px;
    padding: 25px;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s;
    background: white;
}

.doctor-card:hover {
    border-color: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.doctor-card:last-child {
    margin-bottom: 0;
}

/* 医生头像 */
.doctor-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-avatar .avatar-placeholder {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.online-status i {
    color: #10b981;
    font-size: 10px;
}

/* 医生内容 */
.doctor-content {
    flex: 1;
    min-width: 0;
}

.doctor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.doctor-name {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.doctor-name a {
    color: #1f2937;
    text-decoration: none;
}

.doctor-name a:hover {
    color: #4f46e5;
}

.doctor-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.title-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.title-badge.title-zr {
    background: #dc2626;
}

.title-badge.title-fzr {
    background: #ea580c;
}

.title-badge.title-zz {
    background: #0891b2;
}

.title-badge.title-zy {
    background: #059669;
}

.title-badge.title-ys {
    background: #6b7280;
}

.doctor-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.doctor-rating i {
    color: #fbbf24;
    font-size: 14px;
}

.doctor-rating .far {
    color: #d1d5db;
}

.rating-score {
    margin-left: 5px;
    color: #6b7280;
    font-weight: 500;
    font-size: 14px;
}

/* 医生信息 */
.doctor-info {
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #6b7280;
}

.info-row i {
    width: 16px;
    color: #9ca3af;
}

.info-row a {
    color: #4f46e5;
    text-decoration: none;
}

.info-row a:hover {
    text-decoration: underline;
}

/* 医生专长和经验 */
.doctor-specialties,
.doctor-experience {
    margin-bottom: 10px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.doctor-specialties strong,
.doctor-experience strong {
    color: #1f2937;
}

/* 医生统计 */
.doctor-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
}

.doctor-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
}

.doctor-stats i {
    color: #9ca3af;
}

/* 医生操作按钮 */
.doctor-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 120px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.doctor-actions .btn {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    z-index: 3;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-secondary {
    background: #10b981;
    color: white;
}

.btn-secondary:hover {
    background: #059669;
}

/* 医生详情页样式 */
.doctor-detail-page {
    background: #f8fafc;
    min-height: 100vh;
}

.doctor-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

/* 医生资料卡片 */
.doctor-profile-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 30px;
}

.doctor-profile-card .doctor-header {
    display: flex;
    gap: 25px;
    padding: 30px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.doctor-profile-card .doctor-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.doctor-profile-card .doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-profile-card .avatar-placeholder {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.doctor-basic-info {
    flex: 1;
}

.doctor-basic-info .doctor-name {
    font-size: 28px;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.doctor-title-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.category-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
}

.doctor-basic-info .doctor-rating {
    margin-bottom: 15px;
}

.doctor-basic-info .doctor-rating i {
    font-size: 16px;
    color: #fbbf24;
}

.doctor-basic-info .rating-score {
    font-size: 16px;
    font-weight: 600;
    margin-left: 8px;
    color: white;
}

.rating-count {
    margin-left: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.doctor-hospital-info,
.doctor-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.doctor-hospital-info a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.doctor-hospital-info a:hover {
    text-decoration: underline;
}

.hospital-level {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 8px;
}

.doctor-profile-card .doctor-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 180px;
}

.doctor-profile-card .doctor-actions .btn {
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid transparent;
    cursor: pointer;
}

.doctor-profile-card .btn-primary {
    background: white;
    color: #4f46e5;
    border-color: white;
}

.doctor-profile-card .btn-primary:hover {
    background: #f8fafc;
}

.doctor-profile-card .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.doctor-profile-card .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.doctor-profile-card .btn-outline {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.doctor-profile-card .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.doctor-profile-card .btn small {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
    display: block;
}

/* 医生统计 */
.doctor-stats {
    display: flex;
    padding: 25px 30px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
}

/* 标签页 */
.doctor-tabs {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.tab-navigation {
    display: flex;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: #1f2937;
    background: #f3f4f6;
}

.tab-btn.active {
    color: #4f46e5;
    background: white;
    border-bottom-color: #4f46e5;
}

.tab-content {
    padding: 30px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* 信息区块 */
.info-section {
    margin-bottom: 30px;
}

.info-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 15px 0;
    color: #1f2937;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

.info-section h3 i {
    color: #4f46e5;
}

.specialties-content,
.introduction-content,
.experience-content,
.education-content,
.achievements-content {
    color: #6b7280;
    line-height: 1.6;
    font-size: 15px;
}

/* 出诊时间表 */
.schedule-section {
    margin-bottom: 30px;
}

.schedule-table {
    overflow-x: auto;
    margin: 20px 0;
}

.schedule-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.schedule-table th,
.schedule-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}

.schedule-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #1f2937;
}

.schedule-table td.available {
    background: #f0fdf4;
    color: #166534;
    font-weight: 500;
}

.schedule-table td.unavailable {
    background: #fef2f2;
    color: #dc2626;
}

.schedule-note {
    margin-top: 15px;
    padding: 12px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    font-size: 14px;
}

/* 患者评价 */
.reviews-summary {
    margin-bottom: 30px;
    padding: 25px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.rating-overview {
    display: flex;
    align-items: center;
    gap: 20px;
}

.overall-rating {
    text-align: center;
}

.rating-number {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    display: block;
    margin-bottom: 5px;
}

.rating-stars {
    margin-bottom: 5px;
}

.rating-stars i {
    font-size: 18px;
    color: #fbbf24;
}

.total-reviews {
    color: #6b7280;
    font-size: 14px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.patient-name {
    font-weight: 600;
    color: #1f2937;
}

.review-rating i {
    color: #fbbf24;
    font-size: 14px;
}

.review-date {
    color: #6b7280;
    font-size: 13px;
}

.review-content {
    color: #6b7280;
    line-height: 1.6;
}

/* 侧边栏 */
.doctor-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.hospital-widget h4 {
    margin: 0 0 15px 0;
    color: #1f2937;
}

.hospital-widget h4 a {
    color: #4f46e5;
    text-decoration: none;
}

.hospital-widget h4 a:hover {
    text-decoration: underline;
}

.hospital-info {
    margin-bottom: 20px;
}

.hospital-info .info-item {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
}

.hospital-info .label {
    color: #6b7280;
    width: 60px;
    flex-shrink: 0;
}

.hospital-info .value {
    color: #1f2937;
    flex: 1;
}

.related-doctors {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-doctors .doctor-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    transition: all 0.2s;
}

.related-doctors .doctor-item:hover {
    border-color: #e5e7eb;
    background: #fafafa;
}

.related-doctors .doctor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.related-doctors .doctor-info h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.related-doctors .doctor-info h5 a {
    color: #1f2937;
    text-decoration: none;
}

.related-doctors .doctor-info h5 a:hover {
    color: #4f46e5;
}

.consultation-widget {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.consultation-widget .widget-title {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.consultation-info p {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.consultation-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.consultation-info ul li {
    padding: 5px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.consultation-info ul li:before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    margin-right: 8px;
}

.consultation-widget .btn-primary {
    background: white;
    color: #4f46e5;
    border-color: white;
}

.consultation-widget .btn-primary:hover {
    background: #f8fafc;
}

/* 咨询弹窗 */
.doctor-consultation-info {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.consultation-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.consultation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.consultation-avatar i {
    width: 60px;
    height: 60px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
}

.consultation-details h4 {
    margin: 0 0 5px 0;
    color: #1f2937;
}

.consultation-details p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.consultation-fee {
    color: #dc2626 !important;
    font-weight: 600;
    margin-top: 5px !important;
}

.consultation-form .form-group {
    margin-bottom: 20px;
}

.consultation-form label {
    display: block;
    margin-bottom: 8px;
    color: #1f2937;
    font-weight: 500;
}

.consultation-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
}

.consultation-form textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.consultation-form input[type="checkbox"] {
    margin-right: 8px;
}

.login-prompt {
    text-align: center;
    padding: 40px 20px;
}

.login-prompt p {
    margin-bottom: 20px;
    color: #6b7280;
}

.login-prompt a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .doctors-layout,
    .doctor-detail-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .doctors-filters {
        position: static;
    }
    
    .doctor-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .doctor-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .doctor-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .doctor-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .doctor-profile-card .doctor-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .doctor-profile-card .doctor-actions {
        width: 100%;
        flex-direction: row;
        gap: 10px;
    }
    
    .doctor-profile-card .doctor-actions .btn {
        flex: 1;
    }
    
    .doctor-stats {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .stat-item {
        min-width: calc(50% - 7.5px);
    }
    
    .tab-navigation {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        min-width: calc(50% - 1px);
    }
    
    .schedule-table {
        font-size: 12px;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 8px 6px;
    }
    
    .rating-overview {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .search-input-group {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-btn {
        border-radius: 0 0 10px 10px;
    }
    
    .doctor-card {
        padding: 20px;
    }
    
    .doctor-profile-card .doctor-header {
        padding: 20px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .doctor-sidebar {
        gap: 20px;
    }
    
    .consultation-form textarea {
        font-size: 16px; /* 防止iOS缩放 */
    }
}