/* Platform feedback — inviting, low-friction UX */

.ve-feedback-fab {
    position: fixed;
    bottom: 92px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
    cursor: grab;
    touch-action: none;
}

.ve-feedback-fab.ve-floating-dragging {
    cursor: grabbing;
}

.ve-feedback-fab.ve-floating-dragging .ve-feedback-fab-btn {
    transform: none;
    transition: none;
}

.ve-feedback-fab > * {
    pointer-events: auto;
}

.ve-feedback-fab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(20, 184, 166, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ve-feedback-fab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(20, 184, 166, 0.5);
}

.ve-feedback-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: ve-fb-fade-in 0.2s ease;
}

@keyframes ve-fb-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ve-feedback-modal {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: ve-fb-slide-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ve-fb-slide-up {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ve-feedback-modal-header {
    padding: 24px 24px 8px;
    background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
}

.ve-feedback-modal-header h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
}

.ve-feedback-modal-header p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.45;
}

.ve-feedback-modal-body {
    padding: 16px 24px 24px;
}

.ve-feedback-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 8px;
}

.ve-feedback-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.ve-feedback-chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ve-feedback-chip:hover {
    border-color: #14b8a6;
    color: #0f766e;
}

.ve-feedback-chip.active {
    border-color: #14b8a6;
    background: #ecfdf5;
    color: #0f766e;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.ve-feedback-textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ve-feedback-textarea:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.ve-feedback-privacy {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 10px;
    line-height: 1.4;
}

.ve-feedback-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.ve-feedback-submit {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ve-feedback-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ve-feedback-cancel {
    padding: 12px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
}

.ve-feedback-success {
    text-align: center;
    padding: 32px 24px 28px;
}

.ve-feedback-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.ve-feedback-case-num {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    color: #475569;
}

.ve-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ve-chat-feedback-link {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.ve-chat-feedback-link:hover {
    background: rgba(255,255,255,0.28);
}

.ve-chat-rating-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.97);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    animation: ve-fb-fade-in 0.25s ease;
}

.ve-chat-rating-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.ve-chat-rating-sub {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 16px;
}

.ve-chat-stars {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.ve-chat-star {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #cbd5e1;
    transition: transform 0.12s, color 0.12s;
    padding: 0 2px;
}

.ve-chat-star:hover,
.ve-chat-star.active {
    color: #f59e0b;
    transform: scale(1.12);
}

.ve-chat-answered {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.ve-chat-answered-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: 0.78rem;
    cursor: pointer;
}

.ve-chat-answered-btn.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.ve-chat-rating-comment {
    width: 100%;
    max-width: 280px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.82rem;
    margin-bottom: 12px;
}

.ve-chat-rating-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 280px;
}

.ve-chat-rating-submit {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.ve-chat-rating-skip {
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.82rem;
    cursor: pointer;
}

.ve-chat-escalate {
    margin-top: 10px;
    font-size: 0.78rem;
    color: #64748b;
}

.ve-chat-escalate button {
    background: none;
    border: none;
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}

@media (max-width: 480px) {
    .ve-feedback-fab:not(.ve-floating-custom-pos) {
        bottom: 80px;
        right: 16px;
    }
}
