/* 非对话简历流程的节点进度提示，使用独立类名避免影响已有加载样式。 */
.resume-node-status {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 4px 20px;
    color: #8c8c8c;
    font-size: 13px;
    line-height: 20px;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.resume-node-status > span:last-child {
    min-width: 0;
}

.resume-node-status-spinner {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    box-sizing: border-box;
    margin-top: 4px;
    border: 1.5px dotted #a3a3a3;
    border-right-color: transparent;
    border-radius: 50%;
    animation: resume-node-spin 1.2s linear infinite;
}

@keyframes resume-node-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .resume-node-status-spinner {
        animation: none;
    }
}

/* 保留筛选表格布局，分析期间由蒙层统一展示进度并阻止操作。 */
.resume-analysis-region {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 400px;
}

.resume-analysis-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: #666;
    text-align: center;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.resume-analysis-overlay p {
    margin: 0;
    max-width: 100%;
}

/* 模态框基础样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    z-index: 1000;
    overflow-y: auto;
}

/* 全屏模式下的overlay样式 - 改为基于父组件 */
.fullscreen-overlay {
    padding: 0;
    background-color: rgba(0, 0, 0, 0.7);
    /* 改为基于父组件的全屏 */
    position: absolute;
    width: 100%;
    height: auto;
}

.modal-container {
    background-color: #fff;
    border-radius: 8px;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 3vh auto auto auto;
    transition: all 0.3s ease-out;
    overflow: hidden;
}

/* 全屏模式样式 - 改为基于父组件 */
.modal-container.fullscreen {
    width: 100%;
    max-width: none;
    height: 100%;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

/* PC端布局 */
.pc-layout {
    width: 80%;
    max-width: 600px;
    min-width: 320px;
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
    .pc-layout {
        width: 95%;
    }

    .modal-overlay {
        padding: 10px 0px 0px 0px;
    }

    .modal-container.fullscreen {
        /* 移动端也基于父组件尺寸 */
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 16px 16px 0 0;
        /* 保留安全区域支持 */
        padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    }
}

/* 模态框头部样式 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 16px;
    height: 50px;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.header-icon {
    width: 24px;
    height: 24px;
}

.close-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.close-button:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.close-button span {
    font-size: 24px;
    line-height: 1;
    color: #999;
}

.close-button:hover span {
    color: #666;
}


/* 文件上传区域通用样式 */
.upload-area {
    cursor: pointer;
    width: 100%;
}


.upload-placeholder {
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed #d9d9d9;
    border-radius: 8px;
    cursor: pointer;
}

.upload-placeholder:hover {
    border: 1px dashed #1890ff;
}

.upload-placeholder img {
    margin-top: 8px;
    width: 50px;
    height: 50px;
}

.upload-placeholder .upload-text {
    margin: 4px 0;
    color: #332F39;
    font-size: 14px;
}

.upload-placeholder .upload-hint {
    font-size: 14px;
    color: #949AA5;
    margin-top: 8px;
    padding: 0px 10px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-all;
    line-height: 1.4;
}


/* 文件项样式 */
.file-item {
    position: relative;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.3s;
    cursor: pointer;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item:hover {
    border-color: #0D75FB;
}

.file-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.file-icon {
    color: #0D75FB;
    flex-shrink: 0;
}

.file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 50px);
}

.remove-file {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    margin-left: 8px;
    border-radius: 4px;
    transition: all 0.2s;
    min-width: 30px;
    min-height: 30px;
}

.remove-file:hover {
    background-color: #f1f5f9;
    color: #475569;
}

.file-input {
    display: none;
}



/* 输入容器样式 */
.input-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 50px);
    background: linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;
    /* 减去header高度 */
    overflow-y: auto;
}

.input-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
    text-align: center;
}

/* JD输入区域样式 */
.jd-input-section {
    margin-bottom: 20px;
}

.jd-input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.job-description-textarea {
    width: calc(100% - 16px);
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.3s;
    padding: 8px;
}

.job-description-textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 简历上传区域样式 */
.resume-upload-section {
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.resume-upload-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

/* 面试设置区域 */
.interview-settings-section {
    margin-bottom: 24px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.settings-row {
    margin-bottom: 20px;
}

.settings-row:last-child {
    margin-bottom: 0;
}

.settings-label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
    font-size: 14px;
}

/* 题目数量滑块样式 */
.question-number-section {
    width: 100%;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.question-slider {
    flex: 1;
    height: 6px;
    background: #ddd;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
}

.question-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #0D75FB;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.question-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #0D75FB;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-value {
    font-weight: 600;
    color: #0D75FB;
    font-size: 14px;
    min-width: 30px;
    text-align: center;
}

/* 开关样式 */
.analysis-toggle-section {
    width: 100%;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: #0D75FB;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 提交按钮通用样式 */
.submit-button {
    margin-top: 10px;
    padding: 10px 30px;
    background: #0D75FB;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
    align-self: center;
}

.submit-button:hover {
    background-color: #40a9ff;
}

.submit-button:disabled {
    background-color: rgba(0,0,0,0.04);
    color: rgba(0,0,0,0.25);
    cursor: not-allowed;
}



/* AI免责声明和备案信息样式 */
.ai-disclaimer {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: #999;
    line-height: 1.5;
}

.ai-disclaimer p {
    margin: 4px 0;
}

.beian-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.ai-disclaimer a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ai-disclaimer a:hover {
    color: #1890ff;
    text-decoration: underline;
}

/* 添加加载状态的样式 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 24px;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--pcm-primary-color, #1890ff);
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
  }
  
  .loading-text {
    font-size: 16px;
    color: var(--pcm-text-color, #333);
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

/* 历史会话按钮 */
.header-history-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #bbb;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.header-history-button svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.header-history-button:hover {
  background-color: rgba(0, 0, 0, 0.04);
  color: #666;
}

.header-history-button:focus-visible {
  outline: 2px solid rgba(13, 117, 251, 0.35);
  outline-offset: 2px;
}

/* 历史会话抽屉内容 */
.history-drawer-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.conversation-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.loading-conversations,
.empty-conversations {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #999;
}

.loading-conversations .loading-spinner-small {
  margin-bottom: 12px;
}

.conversation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 0 8px 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.conversation-item:hover {
  background: #f5f5f5;
}

.conversation-info {
  flex: 1;
  min-width: 0;
}

.conversation-title {
  font-size: 14px;
  font-weight: 500;
  color: #262626;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8c8c8c;
}

.conversation-time {
  flex-shrink: 0;
}

.message-count {
  flex-shrink: 0;
}

.conversation-status {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.conversation-status.completed {
  background: #f6ffed;
  color: #52c41a;
}

.conversation-status.running {
  background: #fff7e6;
  color: #fa8c16;
}

.header-history-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background: #e6f7ff;
  color: #1890ff;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.header-history-entry:hover {
  background: #bae7ff;
  color: #0958d9;
  transform: translateY(-1px);
}

.header-history-entry:focus-visible {
  outline: 2px solid rgba(13, 117, 251, 0.35);
  outline-offset: 2px;
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid #f0f0f0;
}

.history-pagination-button {
  min-width: 72px;
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #595959;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.history-pagination-button:hover:not(:disabled) {
  border-color: #1890ff;
  color: #1890ff;
  background: #e6f7ff;
}

.history-pagination-button:disabled {
  border-color: #f0f0f0;
  color: #bfbfbf;
  background: #fafafa;
  cursor: not-allowed;
}

.history-pagination-info {
  flex: 1;
  text-align: center;
  color: #8c8c8c;
  font-size: 12px;
}
  
