/* User Feedback Mechanism Styles for CalcHub */

/* Rating system */
.rating-system {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--card-background, #f8f9fa);
    border-radius: 8px;
    text-align: center;
}

.rating-question {
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-color, #333);
}

.star-rating {
    display: inline-flex;
    direction: rtl; /* Right to left for easier hover effect */
}

.star {
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s ease;
}

.star:hover,
.star.hover {
    color: #ffb400;
}

.star.selected {
    color: #ffb400;
}

/* Ensure the hover effect works correctly */
.star:hover ~ .star,
.star.hover ~ .star {
    color: #ffb400;
}

.rating-message {
    height: 20px;
    margin-top: 10px;
    color: var(--primary-color, #1a73e8);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rating-message.show {
    opacity: 1;
}

/* Feedback button */
.feedback-button {
    position: fixed;
    right: 20px;
    bottom: 80px; /* Position above saved calculations button */
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background-color: var(--primary-color, #1a73e8);
    color: white;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1030;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.feedback-button:hover {
    transform: translateY(-2px);
    background-color: var(--primary-color, #1a73e8);
}

.feedback-button svg {
    margin-right: 8px;
}

/* Feedback form container */
.feedback-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.feedback-form-container.open {
    opacity: 1;
    visibility: visible;
}

.feedback-form-content {
    width: 90%;
    max-width: 500px;
    background-color: var(--card-background, white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.feedback-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--primary-color, #1a73e8);
    color: white;
}

.feedback-form-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close-feedback-form {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#feedback-form {
    padding: 20px;
}

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

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

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background-color: var(--input-background, white);
    color: var(--text-color, #333);
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Success message */
.feedback-success {
    padding: 30px 20px;
    text-align: center;
}

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background-color: #28a745;
    color: white;
    border-radius: 50%;
    font-size: 30px;
}

.feedback-success h3 {
    margin-bottom: 15px;
    color: var(--text-color, #333);
}

.feedback-success p {
    margin-bottom: 20px;
    color: var(--text-color, #666);
}

.close-success-btn {
    padding: 8px 20px;
}

/* Dark mode adjustments */
.dark-mode .star {
    color: #555;
}

.dark-mode .star.selected,
.dark-mode .star:hover,
.dark-mode .star.hover,
.dark-mode .star:hover ~ .star,
.dark-mode .star.hover ~ .star {
    color: #ffb400;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .feedback-button {
        padding: 6px 12px;
        font-size: 14px;
        right: 10px;
        bottom: 70px;
    }
    
    .feedback-button svg {
        width: 18px;
        height: 18px;
    }
    
    .star {
        font-size: 24px;
        padding: 0 3px;
    }
}
