/**
 * 意见反馈功能样式
 * 包含反馈按钮、弹窗和表单的样式
 */

/* 反馈按钮容器 */
.feedback-button-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

/* 反馈按钮 */
.feedback-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #67b0c4 0%, #5a9bb0 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(103, 176, 196, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 80px;
    justify-content: center;
}

.feedback-button:hover {
    background: linear-gradient(135deg, #5a9bb0 0%, #4a8ba0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(103, 176, 196, 0.4);
}

.feedback-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(103, 176, 196, 0.3);
}

.feedback-button i {
    font-size: 16px;
}

/* 反馈弹窗 */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.feedback-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: feedbackModalSlideIn 0.3s ease-out;
}

@keyframes feedbackModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 弹窗头部 */
.feedback-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #67b0c4 0%, #5a9bb0 100%);
    color: white;
}

.feedback-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.feedback-modal-title i {
    font-size: 20px;
}

.feedback-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.feedback-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 弹窗主体 */
.feedback-modal-body {
    padding: 24px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* 表单组 */
.feedback-form-group {
    margin-bottom: 20px;
}

.feedback-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #094156;
    font-size: 14px;
}

.feedback-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    resize: vertical;
}

.feedback-form-control:focus {
    outline: none;
    border-color: #67b0c4;
    box-shadow: 0 0 0 3px rgba(103, 176, 196, 0.1);
}

.feedback-form-control::placeholder {
    color: #9ca3af;
}

/* 字符计数 */
.feedback-char-count {
    text-align: right;
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
}

/* 表单操作按钮 */
.feedback-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.feedback-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feedback-btn-cancel {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.feedback-btn-cancel:hover {
    background-color: #e9ecef;
    color: #495057;
}

.feedback-btn-submit {
    background: linear-gradient(135deg, #67b0c4 0%, #5a9bb0 100%);
    color: white;
}

.feedback-btn-submit:hover {
    background: linear-gradient(135deg, #5a9bb0 0%, #4a8ba0 100%);
    transform: translateY(-1px);
}

.feedback-btn-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* 成功消息 */
.feedback-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    animation: feedbackMessageSlideIn 0.3s ease-out;
}

@keyframes feedbackMessageSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feedback-success-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    font-size: 14px;
    font-weight: 500;
}

.feedback-success-content i {
    font-size: 16px;
}

/* 错误消息 */
.feedback-error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    animation: feedbackMessageSlideIn 0.3s ease-out;
}

.feedback-error-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    font-size: 14px;
    font-weight: 500;
    max-width: 400px;
}

.feedback-error-content i {
    font-size: 16px;
    flex-shrink: 0;
}

.feedback-error-content span {
    flex: 1;
}

.feedback-error-close {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.feedback-error-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .feedback-button-container {
        bottom: 20px;
        right: 20px;
    }
    
    .feedback-button {
        padding: 10px 14px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .feedback-button span {
        display: none;
    }
    
    .feedback-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .feedback-modal-header {
        padding: 16px 20px;
    }
    
    .feedback-modal-body {
        padding: 20px;
    }
    
    .feedback-form-actions {
        flex-direction: column;
    }
    
    .feedback-btn {
        width: 100%;
        justify-content: center;
    }
    
    .feedback-success-message,
    .feedback-error-message {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .feedback-error-content {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .feedback-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .feedback-modal-body {
        max-height: calc(100vh - 80px);
    }
}

/* 滚动条样式 */
.feedback-modal-body::-webkit-scrollbar {
    width: 6px;
}

.feedback-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.feedback-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.feedback-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* 焦点样式 */
.feedback-form-control:focus-visible {
    outline: 2px solid #67b0c4;
    outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .feedback-button {
        border: 2px solid #094156;
    }
    
    .feedback-form-control {
        border-width: 2px;
    }
    
    .feedback-btn {
        border: 2px solid currentColor;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .feedback-modal-content,
    .feedback-success-message,
    .feedback-error-message {
        animation: none;
    }
    
    .feedback-button,
    .feedback-btn {
        transition: none;
    }
    
    .fa-spinner {
        animation: none;
    }
}
