/* feedback.css - Updated Version with Less Translucent Button */ 

/* =================================================================
   FEEDBACK WIDGET
   ================================================================= */

   .feedback-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Less translucent trigger button with more solid teal background */
.feedback-trigger {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 173, 180, 0.8), rgba(0, 139, 148, 0.8)); /* Increased opacity from 0.1 to 0.8 */
    border: 1px solid rgba(0, 173, 180, 0.9); /* Increased opacity from 0.3 to 0.9 */
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 173, 180, 0.3); /* Increased shadow opacity from 0.15 to 0.3 */
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff; /* Changed from #00ADB4 to white for better contrast */
    font-size: 16px;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    /* Ensure proper touch target */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.feedback-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 173, 180, 0.4); /* Increased shadow opacity from 0.25 to 0.4 */
    background: linear-gradient(135deg, rgba(0, 173, 180, 0.9), rgba(0, 139, 148, 0.9)); /* Increased opacity from 0.15 to 0.9 */
    border-color: rgba(0, 173, 180, 1); /* Full opacity on hover */
    color: #ffffff; /* Keep white color on hover */
}

.feedback-trigger.expanded {
    display: none;
}

.feedback-panel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(100%) scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f3f4;
}

.feedback-panel.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.feedback-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f4;
    background: linear-gradient(135deg, #00ADB4, #008B94);
    color: white;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.feedback-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.feedback-subtitle {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.feedback-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.feedback-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.feedback-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

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

.feedback-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

/* Fixed NPS container to prevent scrolling */
.nps-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
    margin: 10px 0;
    max-width: 100%;
}

.nps-button {
    width: 100%;
    height: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0; /* Allow buttons to shrink */
}

.nps-button:hover {
    border-color: #00ADB4;
    background: #f8fafc;
}

.nps-button.selected {
    border-color: #00ADB4;
    background: #00ADB4;
    color: white;
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px;
}

.feedback-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.feedback-textarea:focus {
    outline: none;
    border-color: #00ADB4;
    box-shadow: 0 0 0 2px rgba(0, 173, 180, 0.08);
}

.file-upload-area {
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    background: #fafbfc;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: #00ADB4;
    background: #f8fafc;
}

.file-upload-input {
    display: none;
}

.upload-icon {
    font-size: 18px;
    color: #9ca3af;
    margin-bottom: 6px;
}

.upload-text {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 3px;
}

.upload-subtext {
    font-size: 11px;
    color: #9ca3af;
}

.file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    display: none;
    align-items: center;
    gap: 10px;
}

.file-preview.active {
    display: flex;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.file-size {
    font-size: 11px;
    color: #6b7280;
}

.file-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-remove:hover {
    background: #dc2626;
}

.feedback-actions {
    padding: 16px 20px;
    border-top: 1px solid #f1f3f4;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #fafbfc;
}

.feedback-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    min-width: 70px;
}

.feedback-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.feedback-btn-secondary:hover {
    background: #e5e7eb;
}

.feedback-btn-primary {
    background: #00ADB4;
    color: white;
}

.feedback-btn-primary:hover {
    background: #008B94;
}

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

/* More subtle success design */
.feedback-success {
    text-align: center;
    padding: 32px 20px;
}

.success-icon {
    font-size: 32px;
    color: #059669; /* More muted green */
    margin-bottom: 12px;
    opacity: 0.8;
}

.success-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.success-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.regeneration-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100 !important;
    border-radius: 6px !important;
}

.regeneration-spinner {
    width: 32px !important;
    height: 32px !important;
    border: 3px solid #f3f4f6 !important;
    border-top: 3px solid #00ADB4 !important;
    border-radius: 50% !important;
    animation: feedbackSpin 1s linear infinite !important;
    margin-bottom: 12px !important;
}

.regeneration-text {
    color: #374151 !important;
    font-weight: 500 !important;
    font-size: 13px !important;
}

@keyframes feedbackSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .feedback-widget {
        bottom: 15px;
        right: 15px;
    }

    .feedback-trigger {
        width: 48px;
        height: 48px;
        font-size: 15px;
        /* Enhanced mobile touch handling */
        min-height: 44px; /* iOS recommended minimum touch target */
        min-width: 44px;
    }

    .feedback-panel {
        width: calc(100vw - 30px);
        left: 15px;
        right: 15px;
        bottom: 15px;
        /* Ensure panel appears above mobile UI elements */
        z-index: 1002;
        /* Fix for mobile viewport issues */
        position: fixed;
    }

    .nps-container {
        gap: 2px;
    }

    .nps-button {
        height: 26px;
        font-size: 11px;
    }

    .feedback-content {
        padding: 16px;
    }

    .feedback-actions {
        padding: 12px 16px;
        flex-direction: column;
    }

    .feedback-btn {
        width: 100%;
        padding: 10px 16px;
        /* Better mobile touch targets */
        min-height: 44px;
        touch-action: manipulation;
    }

    .feedback-header {
        padding: 14px 16px;
    }

    .feedback-title {
        font-size: 15px;
    }

    .feedback-subtitle {
        font-size: 12px;
    }

    .nps-labels {
        font-size: 10px;
    }

    /* Ensure close button is easily tappable on mobile */
    .feedback-close {
        width: 32px;
        height: 32px;
        top: 10px;
        right: 10px;
        font-size: 22px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .nps-button {
        height: 24px;
        font-size: 10px;
    }

    .feedback-textarea {
        min-height: 80px;
    }
}

/* Ensure feedback widget appears above other elements */
.feedback-widget {
    z-index: 1001 !important;
}

/* Hide feedback widget on extremely small screens */
@media (max-width: 280px) {
    .feedback-widget {
        display: none;
    }
}