/**
 * 邮件发送对话框样式
 * 专业、简洁、大气的UI设计
 * 支持电脑端和移动端响应式布局
 */

/* ==================== 对话框遮罩层 ==================== */
.email-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

/* ==================== 对话框主体 ==================== */
.email-dialog {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 电脑端样式 */
.email-dialog.desktop {
    width: 100%;
    max-width: 900px;
}

/* 移动端样式 */
.email-dialog.mobile {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
}

/* ==================== 标题栏 ==================== */
.email-dialog-header {
    background: #667eea;
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.email-dialog.mobile .email-dialog-header {
    padding: 20px 24px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    font-size: 32px;
    line-height: 1;
    text-shadow: none;
}

.header-text h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: none;
}

.header-text p {
    margin: 4px 0 0 0;
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.3;
    text-shadow: none;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    flex-shrink: 0;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== 对话框内容 ==================== */
.email-dialog-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.email-dialog.mobile .email-dialog-body {
    padding: 24px 20px;
}

/* 自定义滚动条 */
.email-dialog-body::-webkit-scrollbar {
    width: 8px;
}

.email-dialog-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.email-dialog-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.email-dialog-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ==================== 表单区块 ==================== */
.form-section {
    margin-bottom: 24px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #000000;
    font-size: 14px;
    text-shadow: none;
}

.label-text {
    font-size: 14px;
    color: #000000;
    text-shadow: none;
}

.label-required {
    color: #e74c3c;
    font-size: 14px;
    text-shadow: none;
}

/* ==================== 输入框 ==================== */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: #999;
    pointer-events: none;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    font-size: 14px;
    color: #000000 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    box-sizing: border-box;
    box-shadow: none !important;
    outline: none !important;
    -webkit-text-fill-color: #000000 !important;
    text-shadow: none !important;
}

.form-input:focus {
    outline: none !important;
    border: 1px solid #ddd !important;
    border-color: #ddd !important;
    box-shadow: none !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    text-shadow: none !important;
}

.form-input:active {
    outline: none !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    text-shadow: none !important;
}

/* 覆盖浏览器自动填充样式 */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
    -webkit-text-fill-color: #000000 !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #000000 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-input::placeholder {
    color: #000000 !important;
    opacity: 1 !important;
}

/* ==================== 发送内容 + 卦象格式网格 ==================== */
.content-options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.content-options-grid .checkbox-item,
.content-options-grid .radio-item {
    flex: 0 0 auto;
    width: auto;
    max-width: fit-content;
}

.email-dialog.mobile .content-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.email-dialog.mobile .content-options-grid .checkbox-item {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
    padding: 10px 12px !important;
    white-space: normal !important;
    flex-shrink: 1 !important;
    flex-grow: 1 !important;
    border-width: 1px !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    flex: 1 1 100% !important;
}

.email-dialog.mobile .content-options-grid .radio-item {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
    padding: 10px 12px !important;
    white-space: normal !important;
    flex-shrink: 1 !important;
    flex-grow: 1 !important;
    border-width: 1px !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    flex: 1 1 100% !important;
}

.email-dialog.mobile .radio-item:has(input[type="radio"]:checked) {
    border-width: 1px !important;
    padding: 10px 12px !important;
}

.email-dialog.mobile .checkbox-label,
.email-dialog.mobile .radio-label {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.email-dialog.mobile .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==================== 复选框网格 ==================== */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.email-dialog.mobile .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: transparent !important;
    background-color: transparent !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.checkbox-item:hover {
    background: transparent !important;
    background-color: transparent !important;
    border-color: #667eea;
    box-shadow: none !important;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #ddd !important;
    border-radius: 3px;
    background: transparent !important;
    background-color: transparent !important;
    position: relative;
    outline: none !important;
    box-shadow: none !important;
}

.checkbox-item input[type="checkbox"]:focus {
    border: 2px solid #ddd !important;
    outline: none !important;
    box-shadow: none !important;
}

.checkbox-item input[type="checkbox"]:checked {
    background: #667eea !important;
    background-color: #667eea !important;
    border: 2px solid #667eea !important;
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-label {
    font-size: 13px;
    color: #000000;
    font-weight: 500;
    text-shadow: none;
    background: transparent;
}

/* 大号复选框项 */
.checkbox-item-large {
    padding: 12px 14px;
    background: transparent !important;
    border: 1px solid #ddd;
    box-shadow: none !important;
}

.checkbox-item-large:hover {
    background: transparent !important;
    border-color: #667eea;
    box-shadow: none !important;
}

.checkbox-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkbox-desc {
    font-size: 12px;
    color: #000000;
    line-height: 1.4;
    font-weight: 500;
}

/* ==================== 单选按钮组 ==================== */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: transparent !important;
    background-color: transparent !important;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    position: relative;
    box-shadow: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    flex-grow: 0;
    width: auto;
    max-width: fit-content;
    transition: all 0.2s ease;
}

.radio-item:hover {
    background: transparent !important;
    background-color: transparent !important;
    border-color: #667eea;
    box-shadow: none !important;
}

.radio-item:has(input[type="radio"]:checked) {
    background: #f0f3ff !important;
    background-color: #f0f3ff !important;
    border-color: #667eea !important;
    border-width: 2px !important;
}

.radio-item:has(input[type="radio"]:checked) .radio-label {
    color: #667eea !important;
    font-weight: 600 !important;
}

.radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: transparent;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.radio-item input[type="radio"]:checked {
    border-color: #667eea;
    background: #ffffff;
}

.radio-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #667eea;
}

.radio-label {
    font-size: 13px;
    color: #000000;
    font-weight: 500;
    text-shadow: none;
    background: transparent;
}

.radio-badge {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

/* ==================== 定时发送包装器 ==================== */
.scheduled-time-wrapper {
    margin-top: 12px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.4s ease;
}

.scheduled-time-wrapper.show {
    max-height: 500px;
    opacity: 1;
    margin-top: 12px;
}

.scheduled-time-wrapper .form-input {
    padding-left: 14px;
}

/* 快捷时间按钮 */
.quick-time-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.quick-time-btn {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: transparent !important;
    color: #000000;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

.quick-time-btn:hover {
    background: transparent !important;
    border-color: #667eea;
    box-shadow: none !important;
}

.quick-time-btn.active {
    background: #667eea !important;
    color: white;
    border-color: #667eea;
}

.custom-time-input {
    margin-top: 12px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.custom-time-input.show {
    max-height: 100px;
    opacity: 1;
    margin-top: 12px;
}

/* 移动端快捷时间按钮 */
@media (max-width: 768px) {
    .quick-time-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .custom-time-btn {
        grid-column: span 1;
    }
}

/* ==================== 对话框底部 ==================== */
.email-dialog-footer {
    padding: 20px 28px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fafafa;
}

.email-dialog.mobile .email-dialog-footer {
    padding: 16px 20px;
}

/* ==================== 按钮样式 ==================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    min-width: 90px;
    transition: all 0.2s ease;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
}

.btn-secondary {
    background: #e9ecef;
    color: #495057;
}

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

.btn-preview {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-preview:hover {
    background: #f0f3ff;
    border-color: #5568d3;
    color: #5568d3;
}

/* ==================== 加载动画 ==================== */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==================== 发送记录对话框 ==================== */
.email-logs-dialog {
    max-width: 800px;
}

.email-logs-body {
    min-height: 300px;
    max-height: 60vh;
}

/* 加载状态 */
.logs-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.logs-loading p {
    margin-top: 16px;
    font-size: 14px;
}

/* 空状态 */
.logs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.logs-empty svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

.logs-empty p {
    font-size: 14px;
    margin: 0;
}

/* 错误状态 */
.logs-error {
    padding: 40px 20px;
    text-align: center;
    color: #e74c3c;
}

/* ==================== 记录项 ==================== */
.log-item {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.log-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.log-item:last-child {
    margin-bottom: 0;
}

/* 状态颜色 */
.log-item.pending {
    border-left: 4px solid #f39c12;
}

.log-item.sending {
    border-left: 4px solid #3498db;
}

.log-item.success {
    border-left: 4px solid #27ae60;
}

.log-item.failed {
    border-left: 4px solid #e74c3c;
}

/* 记录头部 */
.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.log-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.log-icon {
    font-size: 20px;
}

.log-status-text {
    font-size: 14px;
}

.log-actions {
    display: flex;
    gap: 8px;
}

/* 记录按钮 */
.log-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.log-btn-preview {
    color: #667eea;
    border-color: #667eea;
}

.log-btn-preview:hover {
    background: #667eea;
    color: white;
}

.log-btn-cancel {
    color: #f39c12;
    border-color: #f39c12;
}

.log-btn-cancel:hover {
    background: #f39c12;
    color: white;
}

.log-btn-resend {
    color: #3498db;
    border-color: #3498db;
}

.log-btn-resend:hover {
    background: #3498db;
    color: white;
}

.log-btn-delete {
    color: #e74c3c;
    border-color: #e74c3c;
}

.log-btn-delete:hover {
    background: #e74c3c;
    color: white;
}

/* 记录内容 */
.log-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-info {
    display: flex;
    font-size: 13px;
    line-height: 1.5;
}

.log-label {
    color: #7f8c8d;
    min-width: 80px;
    flex-shrink: 0;
}

.log-value {
    color: #2c3e50;
    word-break: break-all;
}

.log-error {
    display: flex;
    background: #ffebee;
    padding: 10px;
    border-radius: 6px;
    margin-top: 4px;
}

.log-error .log-label {
    color: #c0392b;
}

.log-error .log-value {
    color: #e74c3c;
}

.log-time-remaining {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
}

/* ==================== 移动端优化 ==================== */
@media (max-width: 768px) {
    .email-dialog-overlay {
        padding: 10px;
    }

    .email-dialog {
        border-radius: 12px;
    }

    .email-dialog-header {
        padding: 18px 20px;
    }

    .header-icon {
        font-size: 28px;
    }

    .header-text h3 {
        font-size: 18px;
    }

    .header-text p {
        font-size: 12px;
    }

    .email-dialog-body {
        padding: 20px 16px;
    }

    .form-section {
        margin-bottom: 20px;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .radio-item,
    .checkbox-item {
        width: 100%;
    }

    .email-dialog-footer {
        padding: 16px;
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }

    .log-header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .log-actions {
        flex-shrink: 0;
    }

    .log-info {
        flex-direction: column;
        gap: 4px;
    }

    .log-label {
        min-width: auto;
    }
}

/* ==================== 点击遮罩层关闭 ==================== */
.email-dialog-overlay {
    cursor: pointer;
}

.email-dialog {
    cursor: default;
}

/* ==================== 强制覆盖深色样式 ==================== */
.email-dialog input[type="text"],
.email-dialog input[type="email"],
.email-dialog input[type="datetime-local"],
.email-dialog .form-input {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    outline: none !important;
    border: 1px solid #ddd !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #000000 !important;
}

.email-dialog input[type="text"]:focus,
.email-dialog input[type="email"]:focus,
.email-dialog input[type="datetime-local"]:focus,
.email-dialog .form-input:focus {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    outline: none !important;
    border: 1px solid #ddd !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #000000 !important;
}

.email-dialog input[type="text"]:active,
.email-dialog input[type="email"]:active,
.email-dialog input[type="datetime-local"]:active,
.email-dialog .form-input:active {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    outline: none !important;
    border: 1px solid #ddd !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #000000 !important;
}

.email-dialog input[type="checkbox"],
.email-dialog input[type="radio"] {
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.email-dialog input[type="checkbox"] {
    border: 2px solid #ddd !important;
    border-radius: 3px !important;
}

.email-dialog input[type="checkbox"]:focus {
    border: 2px solid #ddd !important;
    outline: none !important;
    box-shadow: none !important;
}

.email-dialog input[type="checkbox"]:checked {
    background: #667eea !important;
    background-color: #667eea !important;
    border: 2px solid #667eea !important;
}

.email-dialog input[type="checkbox"]:checked::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: bold !important;
}

.email-dialog input[type="radio"] {
    accent-color: #667eea !important;
}

.email-dialog input[type="checkbox"]:focus,
.email-dialog input[type="radio"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

.email-dialog .checkbox-item,
.email-dialog .radio-item {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: 2px solid #ddd !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: fit-content !important;
}

.email-dialog .checkbox-item:focus-within,
.email-dialog .radio-item:focus-within {
    border: 2px solid #667eea !important;
    box-shadow: none !important;
}

.email-dialog .checkbox-item:hover,
.email-dialog .radio-item:hover {
    background: transparent !important;
    background-color: transparent !important;
    border-color: #667eea !important;
    box-shadow: none !important;
}

.email-dialog .checkbox-label,
.email-dialog .radio-label {
    color: #000000 !important;
    text-shadow: none !important;
    background: transparent !important;
}

.email-dialog input::placeholder,
.email-dialog .form-input::placeholder {
    color: #000000 !important;
    opacity: 1 !important;
}

.email-dialog input::-webkit-input-placeholder {
    color: #000000 !important;
    opacity: 1 !important;
}

.email-dialog input::-moz-placeholder {
    color: #000000 !important;
    opacity: 1 !important;
}

.email-dialog input:-ms-input-placeholder {
    color: #000000 !important;
    opacity: 1 !important;
}

.email-dialog .checkbox-desc {
    color: #000000 !important;
    font-weight: 500 !important;
}


/* ==================== 解卦报告和字体样式同行布局 ==================== */
.report-font-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.checkbox-item-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: transparent !important;
    background-color: transparent !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: none !important;
    white-space: nowrap;
    user-select: none;
}

.checkbox-item-inline:hover {
    background: transparent !important;
    background-color: transparent !important;
    border-color: #667eea;
    box-shadow: none !important;
}

.checkbox-item-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #ddd !important;
    border-radius: 3px;
    background: #ffffff !important;
    background-color: #ffffff !important;
    position: relative;
    outline: none !important;
    box-shadow: none !important;
}

.checkbox-item-inline input[type="checkbox"]:checked {
    background: #667eea !important;
    background-color: #667eea !important;
    border: 2px solid #667eea !important;
}

.checkbox-item-inline input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.font-style-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-label-inline {
    display: flex;
    align-items: center;
    margin: 0;
    font-weight: 600;
    color: #000000;
    font-size: 14px;
}

.radio-item-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: transparent !important;
    background-color: transparent !important;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    box-shadow: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.radio-item-inline:hover {
    background: transparent !important;
    background-color: transparent !important;
    border-color: #667eea;
    box-shadow: none !important;
}

.radio-item-inline:has(input[type="radio"]:checked) {
    background: #f0f3ff !important;
    background-color: #f0f3ff !important;
    border-color: #667eea !important;
    border-width: 2px !important;
}

.radio-item-inline:has(input[type="radio"]:checked) .radio-label {
    color: #667eea !important;
    font-weight: 600 !important;
}

.radio-item-inline input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: transparent;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.radio-item-inline input[type="radio"]:checked {
    border-color: #667eea;
    background: #ffffff;
}

.radio-item-inline input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #667eea;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .report-font-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .font-style-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }

    .radio-item-inline {
        width: 100%;
    }
}

/* ==================== 邮件预览样式修复 ==================== */
/* 修复卦象标题居中问题 */
#email-preview-container .tag-top {
    text-align: center !important;
    display: block !important;
    width: auto !important;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* 确保卦象网格正确显示 */
#email-preview-container .gua-grid-9 {
    display: grid !important;
    grid-template-columns: repeat(3, 260px) !important;
    gap: 20px !important;
    justify-content: center !important;
}

/* 三宫格：隐藏后6个卦 */
#email-preview-container .gua-grid-9 .hidden-guas {
    display: none !important;
}

/* 九宫格：显示全部9个卦 */
#email-preview-container .gua-grid-9.show-all .hidden-guas {
    display: contents !important;
}
