/* ====== 焦虑自评量表前端样式 - 使用主题默认字体 ====== */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* === 基础样式 === */
.sas-form-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    line-height: 1.6;
    color: var(--dark-color);
}

.sas-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f3极;
}

.sas-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.sas-header p {
    color: #6c757d;
}

/* === 自定义ID区域 === */
.sas-custom-id {
    background: #f8f9ff;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #e6e9ff;
}

.sas-custom-id label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.sas-custom-id .form-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.sas-custom-id input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.sas-custom-id input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    outline: none;
}

.sas-custom-id .button {
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.sas-custom-id .button:hover {
    background: var(--secondary-color);
}

#sas-id-valid-status {
    margin-top: 0.75rem;
    font-weight: 500;
}

.description {
    color: #6c757d;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* === 问题样式 === */
.sas-question {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 3px solid var(--accent-color);
    transition: var(--transition);
}

.sas-question:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.sas-question p {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 1rem;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.options label {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #f8f9ff;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    flex: 1 0 calc(50% - 0.75rem);
    border: 1px solid #e9ecef;
    min-height: 50px;
}

.options label:hover {
    background: #edf2ff;
    border-color: var(--accent-color);
}

.options input[type="radio"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* === 提交按钮 === */
.sas-footer {
    text-align: center;
    margin-top: 2rem;
}

.sas-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.sas-submit:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)); /* 修正的关键错误点 */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}

.sas-submit:disabled {
    background: #adb5bd;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.sas-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sas-loading.visible {
    opacity: 1;
}

.sas-loading img {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
}

/* === 结果区域 === */
.sas-results-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-top: 2rem;
}

.sas-score-display {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.score-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    opacity: 0.9;
    margin-top: 0.5rem;
}

.score-description {
    flex: 1;
    min-width: 300px;
}

.score-description h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.score-description p {
    color: #495057;
    line-height: 1.6;
}

.sas-result-details {
    background: #f8f9ff;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.sas-result-details h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.sas-result-details p {
    color: #495057;
    line-height: 1.7;
}

/* 联系卡片 */
.sas-contact-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    margin: 2rem 0;
}

.sas-contact-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.contact-method {
    flex: 1;
    min-width: 250px;
    display:极lex;
    align-items: flex-start;
    gap: 1rem;
}

.dashicons-phone, .dashicons-email-alt {
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.contact-method div {
    flex: 1;
}

.contact-method p {
    margin: 0.25rem 0;
    color: #495057;
}

.contact-method strong {
    color: #212529;
}

.qrcode {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.qrcode img {
    max-width: 150px;
    height: auto;
    border: 1px solid #e9ecef;
    padding: 10px;
    border-radius: 8px;
    background: white;
}

/* 按钮区域 */
.sas-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.sas-retry, .sas-print {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.sas-retry {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 3px 10px rgba(72, 149, 239, 0.3);
}

.sas-print {
    background: #6c757d;
    color: white;
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.2);
}

.sas-retry:hover {
    background: #2d8bdb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 149, 239, 0.4);
}

.sas-print:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* 邮箱表单 */
.sas-email-form {
    background: #f8f9ff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border: 1px dashed var(--accent-color);
}

.sas-email-form h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.email-input {
    display: flex;
    gap: 0.75rem;
}

.email-input input {
    flex: 1;
    padding: 0.9rem 1.25rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.email-input input:focus {
    border-color: var(--accent-color);
    outline: none;
}

#sas-send-email {
    padding: 0.9rem 1.5rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

#sas-send-email:hover {
    background: #2d8bdb;
}

#sas-email-status {
    margin-top: 1rem;
    min-height: 1.5rem;
}

.success {
    color: #28a745;
    font-weight: 500;
}

.error {
    color: #dc3545;
    font-weight: 500;
}

/* 历史查询 */
#sas-history-container {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

#sas-history-container h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.history-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#sas-history-id {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

#sas-history-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

#sas-history-btn:hover {
    background: var(--secondary-color);
}

/* 响应式调整 */
@media (max-width: 767px) {
    .sas-form-container {
        padding: 1.5rem;
    }
    
    .sas-custom-id .form-group {
        flex-direction: column;
    }
    
    .options label {
        flex: 1 0 100%;
    }
    
    .sas-score-display {
        justify-content: center;
        text-align: center;
    }
    
    .score-description {
        min-width: 100%;
        text-align: center;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .email-input {
        flex-direction: column;
    }
    
    #sas-send-email {
        width: 100%;
    }
    
    .history-form {
        flex-direction: column;
    }
}