/**
 * Feedback Button Component Styles
 * Sistema di feedback/supporto con bottone fixed e modal
 * Posizionato a sinistra del bottone help
 */

/* ==================== FEEDBACK BUTTON ==================== */

/* Fixed feedback button positioning - left of help button */
.feedback-button {
    position: fixed;
    bottom: 20px;
    right: 110px; /* Positioned left of help button (help is at right: 20px, ~80px width) */
    z-index: 1040; /* Same level as help button */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border-width: 2px;
    padding: 0.5rem 1rem;
    background-color: #fff;
}

.feedback-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

/* Mobile responsive - smaller button */
@media (max-width: 768px) {
    .feedback-button {
        bottom: 15px;
        right: 70px; /* Adjust for smaller help button on mobile */
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }

    .feedback-button-text {
        display: none; /* Hide text on mobile, show only icon */
    }

    .feedback-button i {
        margin-right: 0 !important;
    }
}

/* ==================== FEEDBACK MODAL ==================== */

/* Modal customizations */
#feedbackModal .modal-header {
    background: linear-gradient(135deg, #6c757d, #495057);
}

/* Request type button group styling */
#feedbackModal .btn-group {
    display: flex;
    flex-wrap: nowrap;
}

#feedbackModal .btn-group .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.875rem;
}

/* Smaller icons in type buttons */
#feedbackModal .btn-group .btn i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

/* Stack icon and text on smaller buttons */
@media (min-width: 576px) {
    #feedbackModal .btn-group .btn i {
        display: inline;
        font-size: inherit;
        margin-bottom: 0;
    }
}

/* Mobile: icons only */
@media (max-width: 575px) {
    #feedbackModal .btn-group .btn {
        padding: 0.5rem 0.25rem;
    }

    #feedbackModal .btn-group .btn i {
        margin-right: 0 !important;
    }

    /* Hide text, show only icon */
    #feedbackModal .btn-group .btn {
        font-size: 1.25rem;
    }
}

/* Response message styling */
#feedbackResponse {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Form validation states */
#feedbackModal .form-control:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

#feedbackModal .form-control.is-invalid {
    border-color: #dc3545;
}

/* Submit button states */
#submitFeedback:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==================== BUTTON GROUP WHEN BOTH BUTTONS PRESENT ==================== */

/* When both help and feedback buttons are present, create a button group effect */
.help-button + .feedback-button,
.feedback-button {
    border-radius: 0.375rem 0 0 0.375rem;
}

/* Adjust help button when feedback is present */
body:has(.feedback-button) .help-button {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* If no feedback button, help button keeps full radius */
.help-button:only-of-type {
    border-radius: 0.375rem;
}
