/* 反馈系统样式 - 使用统一modal样式 */

/* 反馈弹窗特定样式 */
#feedbackOverlay .modal-content {
    max-width: 560px;
    max-height: 85vh;
    overflow: hidden;
}

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

/* 卡片化容器与阴影 */
.feedback-modal-card {
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    padding: 0;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfe 100%);
    display: flex;
    flex-direction: column;
}

/* 头部区域 */
.feedback-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid #eef1f6;
    background: #ffffffcc;
    backdrop-filter: blur(6px);
}
.feedback-header-left { display: flex; align-items: center; gap: 12px; }
.feedback-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef2ff;
    color: #667eea;
    display: grid;
    place-items: center;
}
.feedback-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.feedback-title { font-size: 18px; color: #1f2937; 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: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.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(135deg, #6366f1 0%, #4f46e5 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 6px 14px rgba(79,70,229,0.25);
}

.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(135deg, #6366f1 0%, #8b5cf6 100%); color: #fff; box-shadow: 0 8px 18px rgba(99,102,241,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);
    }
}

.feedback-modal {
    animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.dropdown-button {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    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;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.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);
}
