/**
 * Pic Pro 反馈弹窗样式
 *
 * 定义支付与资源反馈对话框的布局和状态。
 *
 * @link https://www.zhutitu.com/pic-pro
 */
.feedback-chat-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    padding: 0;
    max-width: 480px;
    width: 100%;
    background: var(--pic-bg-white, #fff);
    color: var(--pic-text, #1a1a1a);
}
.feedback-chat-modal-content .pic-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}
.feedback-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--pic-space-sm);
    padding: var(--pic-space-lg);
    border-bottom: 1px solid var(--pic-border);
    background: var(--pic-bg-white);
}
.feedback-chat-header .feedback-modal-title,
.feedback-chat-header .pic-modal-title {
    margin: 0;
    font-size: var(--pic-font-size-md);
    font-weight: 600;
    color: var(--pic-text);
    text-align: left;
    padding: 0;
}
.feedback-chat-status {
    margin-right: 30px;
}
.feedback-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--pic-radius-xs);
    font-size: 11px;
    font-weight: 500;
}
.feedback-status-badge.is-open {
    background: #07c160;
    color: #fff;
}
.feedback-status-badge.is-pending {
    background: #fa9d3b;
    color: #fff;
}
.feedback-status-badge.is-closed {
    background: var(--pic-text-muted, #737373);
    color: #fff;
}
.feedback-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 300px;
    max-height: 420px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--pic-bg-gray, #f0f2f5);
    scrollbar-width: thin;
    scrollbar-color: var(--pic-border, #e5e7eb) transparent;
}
.feedback-chat-messages::-webkit-scrollbar { width: 4px; }
.feedback-chat-messages::-webkit-scrollbar-track { background: transparent; }
.feedback-chat-messages::-webkit-scrollbar-thumb { background: var(--pic-border, #e5e7eb); border-radius: var(--pic-radius-xs); }
.feedback-chat-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    width: 100%;
    min-height: 200px;
    gap: 18px;
}
.feedback-chat-skeleton-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}
.feedback-chat-skeleton-row.is-right {
    flex-direction: row-reverse;
}
.feedback-chat-skeleton-avatar,
.feedback-chat-skeleton-bubble {
    display: block;
    flex: 0 0 auto;
    background: var(--pic-loading-gradient);
    background-size: var(--pic-loading-size);
    animation: var(--pic-loading-animation);
}
.feedback-chat-skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--pic-radius-xs);
}
.feedback-chat-skeleton-bubble {
    width: min(62%, 260px);
    height: 54px;
    border-radius: var(--pic-radius-xs);
}
.feedback-chat-skeleton-row.is-right .feedback-chat-skeleton-bubble {
    width: min(48%, 210px);
}
.feedback-chat-skeleton-row.is-short .feedback-chat-skeleton-bubble {
    width: min(38%, 168px);
    height: 42px;
}
.feedback-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: var(--pic-text-muted, #737373);
    font-size: 13px;
}
.feedback-chat-empty .icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}
@media (prefers-reduced-motion: reduce) {
    .feedback-chat-skeleton-avatar,
    .feedback-chat-skeleton-bubble {
        animation: none;
    }
}
.feedback-initial-card {
    background: var(--pic-bg-elevated, #fff);
    border-radius: var(--pic-radius-xs);
    padding: 12px;
    border-left: 3px solid #07c160;
    box-shadow: var(--pic-shadow-sm, 0 1px 2px rgba(0,0,0,0.08));
}
.feedback-initial-card .feedback-card-label {
    font-size: 12px;
    color: #07c160;
    margin-bottom: 6px;
    font-weight: 500;
}
.feedback-initial-card .feedback-card-type {
    font-size: 13px;
    font-weight: 500;
    color: var(--pic-text, #1a1a1a);
    margin-bottom: 4px;
}
.feedback-initial-card .feedback-card-detail {
    font-size: 13px;
    color: var(--pic-text-light, #4a4a4a);
    line-height: 1.5;
    margin-bottom: 6px;
}
.feedback-initial-card .feedback-card-time {
    font-size: 11px;
    color: var(--pic-text-muted, #737373);
}
.feedback-message {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 8px !important;
    max-width: 100% !important;
    margin-bottom: 4px !important;
}
.feedback-message.is-me {
    flex-direction: row-reverse !important;
}
.feedback-message.is-other {
    flex-direction: row !important;
}
.feedback-message-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: var(--pic-radius-xs) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #fff !important;
    flex-shrink: 0 !important;
}
.feedback-message.is-me .feedback-message-avatar {
    background: #07c160 !important;
}
.feedback-message.is-other .feedback-message-avatar {
    background: #1890ff !important;
}
.feedback-message-content {
    display: flex !important;
    flex-direction: column !important;
    max-width: calc(100% - 50px) !important;
}
.feedback-message.is-me .feedback-message-content {
    align-items: flex-end !important;
}
.feedback-message.is-other .feedback-message-content {
    align-items: flex-start !important;
}
.feedback-message-bubble {
    padding: 10px 12px !important;
    border-radius: var(--pic-radius-xs) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
    position: relative !important;
    max-width: 100% !important;
    display: inline-block !important;
}
.feedback-message.is-me .feedback-message-bubble {
    background: #95ec69 !important;
    color: #333 !important;
}
.feedback-message.is-me .feedback-message-bubble::before {
    content: '' !important;
    position: absolute !important;
    right: -6px !important;
    top: 10px !important;
    border: 6px solid transparent !important;
    border-left-color: #95ec69 !important;
    border-right: 0 !important;
}
.feedback-message.is-other .feedback-message-bubble {
    background: var(--pic-bg-elevated, #fff) !important;
    color: var(--pic-text, #1a1a1a) !important;
}
.feedback-message.is-other .feedback-message-bubble::before {
    content: '' !important;
    position: absolute !important;
    left: -6px !important;
    top: 10px !important;
    border: 6px solid transparent !important;
    border-right-color: var(--pic-bg-elevated, #fff) !important;
    border-left: 0 !important;
}
.feedback-message-time {
    font-size: 11px !important;
    color: var(--pic-text-muted, #737373) !important;
    margin-top: 4px !important;
}
.feedback-time-divider {
    text-align: center;
    padding: 8px 0;
}
.feedback-time-divider span {
    display: inline-block;
    background: var(--pic-border-light, #f0f1f3);
    color: var(--pic-text-muted, #737373);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--pic-radius-xs);
}
.feedback-message-system {
    text-align: center;
    font-size: 12px;
    color: var(--pic-text-muted, #737373);
    padding: 4px 10px;
    background: var(--pic-bg-hover, #f8fafc);
    border-radius: var(--pic-radius-xs);
    align-self: center;
    font-weight: 500;
}
.feedback-chat-input-area {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--pic-border, #e5e7eb);
    background: var(--pic-bg-white, #fff);
}
.feedback-chat-hint {
    font-size: 12px;
    color: var(--pic-text-muted, #737373);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: var(--pic-warning-light, #fef3c7);
    border-radius: var(--pic-content-radius);
    display: none;
}
.feedback-chat-hint.is-visible {
    display: block;
}
.feedback-chat-hint.is-warning {
    background: var(--pic-warning-light, #fef3c7);
    color: var(--pic-warning, #ea580c);
}
.feedback-chat-hint.is-info {
    background: rgba(23, 162, 184, 0.12);
    color: var(--pic-info, #17a2b8);
}
.feedback-chat-textarea,
.feedback-chat-textarea.pic-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pic-border, #e5e7eb);
    border-radius: var(--pic-control-radius);
    font-size: 14px;
    resize: none;
    margin-bottom: 10px;
    font-family: inherit;
    background: var(--pic-bg-white, #fff);
    color: var(--pic-text, #1a1a1a);
    transition: border-color 0.2s;
}
.feedback-chat-textarea:focus {
    outline: none;
    border-color: var(--pic-primary, #3b82f6);
}
.feedback-chat-textarea::placeholder {
    color: var(--pic-text-muted, #737373);
}
.feedback-chat-textarea:disabled {
    background: var(--pic-bg-light, #fafbfc);
    cursor: not-allowed;
}
.feedback-chat-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.feedback-chat-close-btn {
    color: var(--pic-text-muted, #737373);
}
.feedback-chat-close-btn:hover {
    color: var(--pic-error, #f56c6c);
    border-color: var(--pic-error, #f56c6c);
}
.feedback-chat-send-btn {
    min-width: 80px;
}
.feedback-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.feedback-chat-closed-notice[hidden] {
    display: none !important;
}
.feedback-chat-closed-notice {
    padding: 20px;
    text-align: center;
    background: var(--pic-bg-light, #fafbfc);
    border-top: 1px solid var(--pic-border, #e5e7eb);
}
.feedback-chat-closed-notice .icon {
    font-size: 24px;
    color: var(--pic-text-muted, #737373);
    margin-bottom: 8px;
}
.feedback-chat-closed-notice p {
    margin: 0;
    color: var(--pic-text-muted, #737373);
    font-size: 13px;
}
:root[data-theme="dark"] .feedback-message.is-me .feedback-message-avatar {
    background: #166534 !important;
}
:root[data-theme="dark"] .feedback-message.is-other .feedback-message-avatar {
    background: #1d4ed8 !important;
}
:root[data-theme="dark"] .feedback-status-badge.is-open {
    background: #166534;
}
:root[data-theme="dark"] .feedback-status-badge.is-pending {
    background: #92400e;
}
:root[data-theme="dark"] .feedback-status-badge.is-closed {
    background: #525252;
}
:root[data-theme="dark"] .feedback-message.is-me .feedback-message-bubble {
    background: #166534 !important;
    color: #f5f5f5 !important;
}
:root[data-theme="dark"] .feedback-message.is-me .feedback-message-bubble::before {
    border-left-color: #166534 !important;
}
:root[data-theme="dark"] .feedback-chat-loading,
:root[data-theme="dark"] .feedback-chat-empty,
:root[data-theme="dark"] .feedback-initial-card .feedback-card-time,
:root[data-theme="dark"] .feedback-message-time,
:root[data-theme="dark"] .feedback-time-divider span,
:root[data-theme="dark"] .feedback-message-system,
:root[data-theme="dark"] .feedback-chat-closed-notice .icon,
:root[data-theme="dark"] .feedback-chat-closed-notice p,
:root[data-theme="dark"] .feedback-chat-textarea::placeholder {
    color: var(--pic-text-light, #a3a3a3) !important;
}
:root[data-theme="dark"] .feedback-chat-close-btn {
    color: var(--pic-text-light, #a3a3a3);
}
:root[data-theme="dark"] .feedback-chat-close-btn:hover {
    color: var(--pic-error, #f56c6c);
    border-color: var(--pic-error, #f56c6c);
}
.btn-resource-feedback.is-submitted,
.pic-feedback-btn.is-submitted {
    color: var(--pic-primary, #3b82f6) !important;
}
.btn-resource-feedback.is-submitted .icon,
.pic-feedback-btn.is-submitted .icon {
    color: var(--pic-primary, #3b82f6) !important;
}
