/* Feedback Button */
#feedback-button {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    /* background: #2196F3; */
    background: #F05A00 ;
    color: white;
    padding: 15px 8px;
    writing-mode: sideways-lr;
    text-orientation: mixed;
    cursor: pointer;
    z-index: 999;
    border-radius: 5px 0 0 5px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    transition: background 0.3s ease;
    font-weight: 500;
    font-size: 18px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#feedback-button:hover {
    /* background: #1976D2; */
    background: #b44500 ;
    padding-right: 10px; 
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #feedback-button {
        padding: 12px 6px;
        font-size: 12px;
        min-height: 80px;
    }
}

/* Overlay */
#feedback-overlay, #add-feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup */
#feedback-popup, #add-feedback-popup {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.feedback-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

#close-feedback, #close-add-feedback {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 5px;
}

#close-feedback:hover, #close-add-feedback:hover {
    color: #000;
}

/* Content */
#feedback-content {
    padding: 20px;
}

#feedback-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.feedback-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.feedback-item:last-child {
    margin-bottom: 0;
}

.feedback-content {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #333;
}

.feedback-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.feedback-author {
    font-weight: 500;
}

.feedback-date {
    font-style: italic;
}

.feedback-votes {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.vote-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s ease;
    color: #333;
    text-decoration: none;
    min-width: 40px;
    justify-content: center;
}

.vote-btn:hover {
    background: #f5f5f5;
}

.vote-btn.voted {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

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

.upvote-btn.voted {
    background: #4CAF50;
    border-color: #4CAF50;
}

.downvote-btn.voted {
    background: #f44336;
    border-color: #f44336;
}

/* Add suggestion button */
#add-suggestion-btn {
    width: 100%;
    background: #2196F3;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

#add-suggestion-btn:hover {
    background: #1976D2;
}

/* Form styles */
#feedback-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.captcha-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.captcha-group label {
    font-weight: 600;
    color: #2196F3;
}

#feedback-form button[type="submit"] {
    width: 100%;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

#feedback-form button[type="submit"]:hover {
    background: #45a049;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state h4 {
    margin-bottom: 10px;
    color: #333;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #feedback-popup, #add-feedback-popup {
        width: 95%;
        max-height: 90vh;
    }
    
    .feedback-header {
        padding: 15px;
    }
    
    .feedback-header h3 {
        font-size: 16px;
    }
    
    #feedback-content {
        padding: 15px;
    }
    
    .feedback-item {
        padding: 12px;
    }
    
    .feedback-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .feedback-votes {
        margin-top: 8px;
    }
    
    .vote-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    #feedback-form {
        padding: 15px;
    }
}

/* Success/Error messages */
.feedback-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.feedback-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Scrollbar styling for webkit browsers */
#feedback-list::-webkit-scrollbar {
    width: 6px;
}

#feedback-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#feedback-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#feedback-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}