/* =================================================== */
/* 藏医诊断弹窗专用样式文件 - zangyi_tanchuang.css    */
/* 创建时间：2024年1月                              */
/* 功能：藏医诊断结果弹窗的所有样式                  */
/* =================================================== */

/* ==================== 核心弹窗样式 ==================== */

.zangyi-tanchuang {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    animation: zangyi-fade-in 0.3s ease;
}

.zangyi-tanchuang-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f8fafc;
}

/* ==================== 标题样式 ==================== */

.zangyi-tanchuang-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
    pointer-events: none;
}

.zangyi-tanchuang-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: 0.5px;
    color: white;
    background: linear-gradient(135deg, #9333ea, #7c3aed); /* 紫色渐变 */
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.zangyi-tanchuang-title:hover {
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

.zangyi-tanchuang-close-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 1002;
    pointer-events: auto;
}

.zangyi-tanchuang-close-btn:hover {
    background: white;
    color: #475569;
    transform: scale(1.05);
    border-color: #cbd5e1;
}

.zangyi-tanchuang-close-btn:active {
    transform: scale(0.95);
}

/* ==================== 内容区域样式 ==================== */

.zangyi-tanchuang-body {
    flex: 1;
    padding: 40px 20px 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.zangyi-jieguo-container {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.zangyi-jieguo-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
}

.zangyi-jieguo-text strong {
    color: #7c3aed;
    font-weight: 600;
}

.zangyi-jieguo-text em {
    color: #f59e0b;
    font-style: italic;
}

.zangyi-jieguo-end {
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px dotted #d1d5db;
    font-style: italic;
}

/* ==================== 按钮区域样式 ==================== */

.zangyi-tanchuang-footer {
    padding: 20px;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.zangyi-btn-group {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.zangyi-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    flex: 1;
    max-width: 200px;
    position: relative;
    overflow: hidden;
}

.zangyi-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.zangyi-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.fuzhi-btn {
    background-color: #3b82f6;
    color: white;
}

.fuzhi-btn:hover {
    background-color: #2563eb;
}

.zhenduanshu-btn {
    background-color: #10b981;
    color: white;
}

.zhenduanshu-btn:hover {
    background-color: #059669;
}

.close-btn {
    background-color: #6b7280;
    color: white;
}

.close-btn:hover {
    background-color: #4b5563;
}

/* ==================== 动画效果 ==================== */

@keyframes zangyi-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zangyi-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zangyi-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.zangyi-btn:focus:not(:active)::after {
    animation: zangyi-ripple 1s ease-out;
}

@keyframes zangyi-ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
    .zangyi-tanchuang-header {
        padding: 14px 16px;
    }
    
    .zangyi-tanchuang-title {
        font-size: 1.1rem;
        padding: 7px 18px;
        border-radius: 18px;
        top: 14px;
    }
    
    .zangyi-tanchuang-close-btn {
        top: 14px;
        right: 16px;
    }
    
    .zangyi-tanchuang-body {
        padding: 35px 16px 16px;
    }
    
    .zangyi-jieguo-container {
        padding: 18px;
        border-radius: 10px;
    }
    
    .zangyi-jieguo-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .zangyi-tanchuang-footer {
        padding: 16px;
    }
    
    .zangyi-btn-group {
        gap: 10px;
    }
    
    .zangyi-btn {
        min-width: 120px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .zangyi-tanchuang-header {
        padding: 12px 14px;
    }
    
    .zangyi-tanchuang-title {
        font-size: 1rem;
        padding: 6px 16px;
        border-radius: 16px;
        top: 12px;
    }
    
    .zangyi-tanchuang-close-btn {
        width: 32px;
        height: 32px;
        font-size: 1.5rem;
        top: 12px;
        right: 14px;
    }
    
    .zangyi-tanchuang-body {
        padding: 30px 12px 12px;
    }
    
    .zangyi-jieguo-container {
        padding: 16px;
        border-radius: 8px;
    }
    
    .zangyi-jieguo-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .zangyi-jieguo-end {
        font-size: 0.8rem;
        margin-top: 20px;
        padding-top: 16px;
    }
    
    .zangyi-btn-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .zangyi-btn {
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
    }
}

@media (max-width: 360px) {
    .zangyi-tanchuang-title {
        font-size: 0.95rem;
        padding: 5px 14px;
    }
    
    .zangyi-jieguo-text {
        font-size: 0.85rem;
    }
    
    .zangyi-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

@media (prefers-color-scheme: dark) {
    .zangyi-tanchuang-content {
        background-color: #1f2937;
    }
    
    .zangyi-jieguo-container {
        background-color: #374151;
        border-color: #4b5563;
    }
    
    .zangyi-jieguo-text {
        color: #e5e7eb;
    }
    
    .zangyi-tanchuang-footer {
        background-color: #374151;
        border-color: #4b5563;
    }
    
    .zangyi-tanchuang-close-btn {
        background: #4b5563;
        border-color: #6b7280;
        color: #e5e7eb;
    }
}

/* ==================== 辅助类 ==================== */

.zangyi-hidden {
    display: none !important;
}

.zangyi-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
}

.zangyi-loading {
    position: relative;
    color: transparent !important;
}

.zangyi-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: zangyi-spin 0.8s linear infinite;
}

@keyframes zangyi-spin {
    to { transform: rotate(360deg); }
}

.zangyi-tanchuang-body::-webkit-scrollbar {
    width: 6px;
}

.zangyi-tanchuang-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.zangyi-tanchuang-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.zangyi-tanchuang-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}