/* 反馈系统样式 - 与站点风格统一（青色渐变、卡片阴影、弹性放大动画） */

/* 反馈弹窗特定样式 */
/* 置顶层级，覆盖通用模态，避免被其它蒙层遮挡 */
#feedbackOverlay {
    z-index: 2065;
    align-items: center;
    justify-content: center;
    width: 100vw; /* 保证覆盖视口，避免祖先影响 */
    height: 100vh;
}

/* 类型 pills 行样式（与设置面板一致的滑动指示器） */
.fb-pill-row { position: relative; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px; border-radius: 9999px; background: rgba(9,178,224,0.06); }
.fb-pill { position: relative; padding: 8px 12px; border-radius: 9999px; font-size: 12px; border: 1px solid #e5e7eb; cursor: pointer; background: #fff; color: #374151; transition: transform .18s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease, background .2s ease; z-index: 1; }
.fb-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.fb-pill:active { transform: translateY(0); }
.fb-pill.active { color: #fff; border-color: transparent; background: transparent; }
.fb-pill-indicator { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 9999px; background: linear-gradient(180deg, #09c2df 0%, #09b2e0 100%); box-shadow: 0 12px 28px rgba(9,178,224,0.35); z-index: 0; transition: left 420ms cubic-bezier(.22,1,.36,1), top 420ms cubic-bezier(.22,1,.36,1), width 420ms cubic-bezier(.22,1,.36,1), height 420ms cubic-bezier(.22,1,.36,1); }

#feedbackOverlay.modal .modal-content {
    max-width: 560px;
    max-height: 85vh;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.06);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 22px 60px rgba(0,0,0,0.18);
    transform: scale(0.96);
    opacity: 0;
    margin: 0; /* 强制无外边距，避免被全局样式影响 */
    align-self: center; /* 在flex容器中强制居中 */
    left: auto; top: auto; /* 清除潜在的定位干扰 */
}

#feedbackOverlay.modal.active .modal-content {
    /* 确保即使关键帧不可用也可见，并使用不带 translate 的专用弹性动画 */
    opacity: 1;
    transform: scale(1);
    animation: fb-modal-in-bounce 220ms cubic-bezier(.22,1,.36,1) forwards;
}

#feedbackOverlay.modal.closing .modal-content {
    animation: fb-modal-out-bounce 180ms ease forwards;
}

#feedbackOverlay .modal-content > form {
    max-height: calc(85vh - 80px);
    overflow-y: auto;
}

/* 卡片化容器与阴影 */
.feedback-modal-card { padding: 0; display: flex; flex-direction: column; background: transparent; box-shadow: none; border-radius: 0; }

/* 头部区域 */
.feedback-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.7) 100%);
    backdrop-filter: blur(10px);
}
.feedback-header-left { display: flex; align-items: center; gap: 12px; }
.feedback-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e6fbff;
    color: #09b2e0;
    display: grid;
    place-items: center;
}
.feedback-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.feedback-title { font-size: 18px; color: #0b1220; margin: 0; }
.feedback-subtitle { font-size: 12px; color: #6b7280; }

/* 内容主体 */
.feedback-content {
    padding: 18px 22px 24px 22px; /* 由底部固定footer承担遮挡处理 */
    flex: 1 1 auto;
    min-height: 0; /* 允许在flex容器中正确滚动 */
    overflow-y: auto;
}

/* 表单样式 */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
}

.form-label {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    background: #fff;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #09b2e0;
    box-shadow: 0 0 0 3px rgba(9, 178, 224, 0.18);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* 字符计数 */
.char-counter {
    text-align: right;
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
}

.char-counter.warning {
    color: #f56565;
}

/* 验证码相关样式 */
.verification-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.verification-input {
    flex: 1;
    min-width: 0;
}

.verification-btn {
    min-width: 120px;
    white-space: nowrap;
    font-size: 14px;
    padding: 12px 16px;
    background: linear-gradient(180deg, #09c2df 0%, #09b2e0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    box-shadow: 0 10px 26px rgba(9,178,224,0.28);
}

.verification-btn:hover { transform: translateY(-1px); }

.verification-btn:active { transform: translateY(0); }

.verification-btn:disabled {
    background: #9aa0a6;
    color: #ffffff;
    cursor: not-allowed;
}

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

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

.btn-outline:disabled {
    background: #f7fafc;
    border-color: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
}

.btn-outline:disabled:hover {
    background: #f7fafc;
    color: #a0aec0;
}

/* 验证码提示 */
.verification-hint {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0f8ff;
    border: 1px solid #bee3f8;
    border-radius: 6px;
    font-size: 13px;
}

.verification-hint small {
    display: block;
    line-height: 1.4;
}

/* 错误提示 */
.error-message {
    color: #f56565;
    font-size: 12px;
    margin-top: 4px;
    margin-bottom: 6px; /* 与底部操作栏留出更多距离 */
    display: none;
}

.error-message.show {
    display: block;
}

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* 按钮样式 */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn {
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: center;
}

.btn-secondary { background: #eef2f7; color: #475569; }
.btn-secondary:hover { box-shadow: 0 6px 14px rgba(15,23,42,0.08); }

.btn-primary { background: linear-gradient(180deg, #09c2df 0%, #09b2e0 100%); color: #fff; box-shadow: 0 12px 28px rgba(9,178,224,0.35); }
.btn-primary:hover { transform: translateY(-1px); }

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 加载状态 */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 成功/错误提示 */
.feedback-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
}

.feedback-toast.show {
    transform: translateX(0);
}

.feedback-toast.success { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); }

.feedback-toast.error { background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%); }

/* 响应式设计 */
@media (max-width: 768px) {

    
    .feedback-modal {
        width: 95%;
        margin: 20px;
    }
    
    .feedback-header,
    .feedback-content,
    .feedback-actions {
        padding: 20px;
    }
    
    .feedback-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .feedback-toast {
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 采用与设置面板一致的入场/退场动画（已由 .modal.active/.closing 控制） */

/* 粘性底部操作条 */
/* 固定底部操作区 */
.feedback-footer {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, #fff 78%);
    backdrop-filter: blur(8px);
    padding: 12px 22px 16px 22px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* 反馈弹窗专用关键帧（不含 translate(-50%, -50%)，避免与flex居中冲突导致错位） */
@keyframes fb-modal-in-bounce {
    0% { opacity: 0; transform: scale(0.96); }
    60% { opacity: 1; transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes fb-modal-out-bounce {
    0% { opacity: 1; transform: scale(1); }
    40% { transform: scale(1.02); }
    100% { opacity: 0; transform: scale(0.96); }
}

/* 自定义下拉菜单样式 */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-button {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.dropdown-button:hover {
    border-color: #cbd5e0;
}

.dropdown-button:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dropdown-text {
    flex: 1;
    color: #2d3748;
}

.dropdown-arrow {
    display: flex;
    align-items: center;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.dropdown-arrow svg {
    width: 16px;
    height: 16px;
    fill: #718096;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-list-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden; /* 防止出现横向滚动条 */
    box-sizing: border-box; /* 避免边框引起的宽度溢出 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-close {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    color: #475569;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dropdown-close:hover { background: rgba(0,0,0,0.1); }

html.theme-dark .dropdown-close { background: rgba(255,255,255,0.08); color: #cbd5e1; }
html.theme-dark .dropdown-close:hover { background: rgba(255,255,255,0.12); }

.custom-dropdown.open .dropdown-list-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-item {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    color: #2d3748;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background: #f7fafc;
}

.dropdown-item:active {
    background: #edf2f7;
}

.dropdown-item.selected {
    background: #667eea;
    color: white;
}

/* 错误状态下的下拉菜单 */
.custom-dropdown.error .dropdown-button {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* 深色主题适配 */
html.theme-dark #feedbackOverlay.modal { background-color: rgba(0,0,0,0.5); }
html.theme-dark #feedbackOverlay .modal-content { background: rgba(24,26,31,0.96); border-color: rgba(255,255,255,0.08); box-shadow: 0 22px 60px rgba(0,0,0,0.6); }
html.theme-dark .feedback-header { border-color: rgba(255,255,255,0.06); background: linear-gradient(180deg, rgba(24,26,31,0.85) 0%, rgba(24,26,31,0.7) 100%); }
html.theme-dark .feedback-title { color: #e8e8e8; }
html.theme-dark .feedback-subtitle { color: #aab4bf; }
html.theme-dark .form-label { color: #cbd5e1; }
html.theme-dark .form-input, 
html.theme-dark .form-textarea, 
html.theme-dark .form-select { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); color: #e5e7eb; }
html.theme-dark .form-input::placeholder, 
html.theme-dark .form-textarea::placeholder { color: #94a3b8; }
html.theme-dark .form-input:focus,
html.theme-dark .form-textarea:focus,
html.theme-dark .form-select:focus { border-color: #09b2e0; box-shadow: 0 0 0 3px rgba(9,178,224,0.22); }
html.theme-dark .verification-btn { box-shadow: 0 10px 26px rgba(9,178,224,0.35); }
html.theme-dark .verification-hint { background: rgba(14,165,233,0.08); border-color: rgba(14,165,233,0.25); }
html.theme-dark .feedback-footer { background: linear-gradient(180deg, rgba(24,26,31,0.6) 0%, rgba(24,26,31,0.92) 78%); border-color: rgba(255,255,255,0.06); }
html.theme-dark .dropdown-button { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); color: #e5e7eb; }
html.theme-dark .dropdown-item { background: transparent; color: #e5e7eb; }
html.theme-dark .dropdown-item:hover { background: rgba(255,255,255,0.06); }
html.theme-dark .dropdown-list-container { background: rgba(24,26,31,0.98); border-color: rgba(255,255,255,0.08); box-shadow: 0 14px 34px rgba(0,0,0,0.55); }
html.theme-dark .fb-pill-row { background: rgba(255,255,255,0.04); }
html.theme-dark .fb-pill { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); color: #cbd5e1; }
