/* User Feedback Button and Modal Styles */

/* Floating Feedback Button */
.feedback-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
    z-index: 1040;
    border: none;
    color: white;
}

.feedback-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
}

.feedback-button:active {
    transform: translateY(0);
}

.feedback-button i {
    font-size: 24px;
}

.feedback-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Feedback Modal Overlay */
.feedback-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
    animation: fadeIn 0.2s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Feedback Modal */
.feedback-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

.feedback-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.feedback-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-modal-header .close-button {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.feedback-modal-header .close-button:hover {
    background: #f8f9fa;
    color: #212529;
}

.feedback-modal-body {
    padding: 24px;
}

.feedback-form-group {
    margin-bottom: 20px;
}

.feedback-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #212529;
    font-size: 0.95rem;
}

.feedback-form-group .required {
    color: #dc3545;
    margin-left: 2px;
}

.feedback-type-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.feedback-type-option {
    padding: 8px 4px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: white;
}

.feedback-type-option:hover {
    border-color: #0d6efd;
    background: #f8f9ff;
}

.feedback-type-option.selected {
    border-color: #0d6efd;
    background: #e7f1ff;
    color: #0d6efd;
}

.feedback-type-option i {
    font-size: 18px;
    display: block;
    margin-bottom: 2px;
}

.feedback-type-option span {
    font-size: 0.75rem;
    font-weight: 500;
}

.feedback-input,
.feedback-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.feedback-input:focus,
.feedback-textarea:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.feedback-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 4px;
}

.char-counter.warning {
    color: #fd7e14;
}

.char-counter.error {
    color: #dc3545;
}

.feedback-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.feedback-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.feedback-btn-cancel {
    background: #f8f9fa;
    color: #6c757d;
}

.feedback-btn-cancel:hover {
    background: #e9ecef;
    color: #495057;
}

.feedback-btn-submit {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
}

.feedback-btn-submit:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.feedback-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.feedback-btn-submit.loading {
    position: relative;
    color: transparent;
}

.feedback-btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notification */
.feedback-toast {
    position: fixed;
    top: 80px;
    right: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1060;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feedback-toast.success {
    border-left: 4px solid #198754;
}

.feedback-toast.error {
    border-left: 4px solid #dc3545;
}

.feedback-toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.feedback-toast.success .feedback-toast-icon {
    color: #198754;
}

.feedback-toast.error .feedback-toast-icon {
    color: #dc3545;
}

.feedback-toast-content {
    flex: 1;
}

.feedback-toast-title {
    font-weight: 600;
    margin-bottom: 2px;
    color: #212529;
}

.feedback-toast-message {
    font-size: 0.9rem;
    color: #6c757d;
}

.feedback-toast-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.feedback-toast-close:hover {
    background: #f8f9fa;
    color: #212529;
}

/* Dark mode support */
[data-bs-theme="dark"] .feedback-modal,
[data-bs-theme="dark"] .feedback-toast {
    background: #212529;
    color: #dee2e6;
}

[data-bs-theme="dark"] .feedback-modal-header,
[data-bs-theme="dark"] .feedback-modal-footer {
    border-color: #495057;
}

[data-bs-theme="dark"] .feedback-modal-header h3,
[data-bs-theme="dark"] .feedback-toast-title {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .feedback-type-option {
    border-color: #495057;
    background: #343a40;
}

[data-bs-theme="dark"] .feedback-type-option:hover {
    background: #495057;
}

[data-bs-theme="dark"] .feedback-type-option.selected {
    background: #0d3a6e;
}

[data-bs-theme="dark"] .feedback-input,
[data-bs-theme="dark"] .feedback-textarea {
    background: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .feedback-btn-cancel {
    background: #343a40;
    color: #adb5bd;
}

[data-bs-theme="dark"] .feedback-btn-cancel:hover {
    background: #495057;
    color: #f8f9fa;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .feedback-button {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .feedback-button i {
        font-size: 20px;
    }

    .feedback-modal {
        width: 95%;
        margin: 0 auto;
    }

    .feedback-type-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .feedback-toast {
        right: 16px;
        left: 16px;
        min-width: auto;
    }
}
