/* Floating Feedback Button */
.feedback-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--plus-btn-bg, #007AFF);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.feedback-floating-btn.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
    animation: feedbackPulse 2s ease-in-out 3;
}

@keyframes feedbackPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 122, 255, 0.5);
    }
}

.feedback-floating-btn:hover {
    background: var(--aap-button-hover, #0051D5);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 122, 255, 0.4);
    animation: none;
}

.feedback-floating-btn:active {
    transform: scale(0.95);
}

.feedback-floating-btn svg {
    width: 24px;
    height: 24px;
}

/* Feedback Tooltip */
.feedback-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary, #000000);
    color: var(--modal-bg, #ffffff);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.feedback-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid var(--text-primary, #000000);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.feedback-floating-btn:hover .feedback-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(-5px);
}

[data-theme="dark"] .feedback-tooltip {
    background: var(--modal-bg, #1c1c1e);
    color: var(--text-primary, #ffffff);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .feedback-tooltip::after {
    border-left-color: var(--modal-bg, #1c1c1e);
}

/* Feedback Modal */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feedback-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.feedback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.feedback-container {
    position: relative;
    background: var(--modal-bg, #ffffff);
    border-radius: 20px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 1;
}

.feedback-modal.active .feedback-container {
    transform: scale(1);
}

.feedback-header {
    text-align: center;
    margin-bottom: 28px;
}

.feedback-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary, #000000);
    margin: 0 0 8px 0;
}

.feedback-subtitle {
    font-size: 14px;
    color: var(--text-secondary, #666666);
    margin: 0;
}

.feedback-content {
    margin-bottom: 24px;
}

/* Smiley Rating */
.feedback-rating {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.feedback-smiley {
    flex: 1;
    background: var(--capsule-bg, #f5f5f7);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 16px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-smiley:hover {
    background: var(--capsule-hover-bg, #e8e8ed);
    transform: translateY(-2px);
}

.feedback-smiley.selected {
    background: var(--plus-btn-bg, #007AFF);
    border-color: var(--plus-btn-bg, #007AFF);
    transform: scale(1.1);
}

.feedback-smiley .smiley {
    font-size: 32px;
    filter: grayscale(100%);
    transition: filter 0.2s ease;
}

.feedback-smiley:hover .smiley,
.feedback-smiley.selected .smiley {
    filter: grayscale(0%);
}

/* Comment Section */
.feedback-comment-section {
    position: relative;
}

.feedback-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #000000);
    margin-bottom: 8px;
}

.feedback-textarea {
    width: 100%;
    background: var(--capsule-bg, #f5f5f7);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--text-primary, #000000);
    resize: vertical;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.feedback-textarea:focus {
    outline: none;
    border-color: var(--plus-btn-bg, #007AFF);
    background: var(--modal-bg, #ffffff);
}

.feedback-char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary, #666666);
    margin-top: 4px;
}

/* Actions */
.feedback-actions {
    display: flex;
    gap: 12px;
}

.feedback-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-btn-skip {
    background: var(--capsule-bg, #f5f5f7);
    color: var(--text-primary, #000000);
}

.feedback-btn-skip:hover {
    background: var(--capsule-hover-bg, #e8e8ed);
}

.feedback-btn-submit {
    background: var(--plus-btn-bg, #007AFF);
    color: white;
}

.feedback-btn-submit:hover:not(:disabled) {
    background: var(--aap-button-hover, #0051D5);
    transform: translateY(-1px);
}

.feedback-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dark Mode */
[data-theme="dark"] .feedback-container {
    --modal-bg: #1c1c1e;
    --capsule-bg: #2c2c2e;
    --capsule-hover-bg: #3a3a3c;
    --text-primary: #ffffff;
    --text-secondary: #98989f;
}

[data-theme="dark"] .feedback-floating-btn {
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.5);
}

[data-theme="dark"] .feedback-floating-btn:hover {
    box-shadow: 0 6px 30px rgba(0, 122, 255, 0.6);
}

@keyframes feedbackPulseDark {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 122, 255, 0.5);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 122, 255, 0.7);
    }
}

[data-theme="dark"] .feedback-floating-btn.visible {
    animation: feedbackPulseDark 2s ease-in-out 3;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .feedback-floating-btn {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
    }
    
    .feedback-floating-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .feedback-tooltip {
        font-size: 13px;
        padding: 7px 10px;
        right: 66px;
    }
    
    .feedback-container {
        padding: 24px;
        max-width: 90%;
    }
    
    .feedback-title {
        font-size: 20px;
    }
    
    .feedback-rating {
        gap: 8px;
    }
    
    .feedback-smiley {
        padding: 12px 4px;
    }
    
    .feedback-smiley .smiley {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .feedback-floating-btn {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
    
    .feedback-floating-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .feedback-tooltip {
        font-size: 12px;
        padding: 6px 9px;
        right: 62px;
    }
    
    .feedback-container {
        padding: 20px;
    }
    
    .feedback-title {
        font-size: 18px;
    }
    
    .feedback-rating {
        gap: 6px;
    }
    
    .feedback-smiley {
        padding: 10px 2px;
        border-radius: 12px;
    }
    
    .feedback-smiley .smiley {
        font-size: 24px;
    }
    
    .feedback-actions {
        flex-direction: column;
    }
}


