/* ============================================
   Chunk 5: Feedback & Learning System Styles
   Credit Tracker, Feedback Modal, 5-Star Rating
   ============================================ */

/* ============================================
   Purple Credit Stat Card
   ============================================ */
.stat-card.purple {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
}

.stat-card.purple .stat-icon {
    background: rgba(255, 255, 255, 0.2);
}

.stat-card.purple .stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.stat-card.purple .stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
}

.stat-card.purple .stat-subtext {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

/* ============================================
   Icebreaker Actions (Copy + Feedback)
   ============================================ */
.icebreaker-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-feedback {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--background-white);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-feedback:hover {
    background: var(--info-purple);
    color: white;
    border-color: var(--info-purple);
}

/* ============================================
   Feedback Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.feedback-modal {
    background: var(--background-white);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .feedback-modal {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h2 i {
    color: var(--info-purple);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: var(--background-hover);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger-red);
    color: white;
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--background-main);
}

/* ============================================
   Feedback Contact Info
   ============================================ */
.feedback-contact-info {
    background: var(--background-main);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.feedback-contact-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.feedback-contact-info .company {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.feedback-contact-info .activity-summary {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   Feedback Icebreaker Display
   ============================================ */
.feedback-icebreaker {
    margin-bottom: 24px;
}

.feedback-icebreaker label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.feedback-icebreaker .icebreaker-text {
    background: #eff6ff;
    border-left: 4px solid var(--primary-blue);
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
}

/* ============================================
   5-Star Rating System
   ============================================ */
.feedback-rating {
    margin-bottom: 24px;
}

.feedback-rating label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.star-rating {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.star {
    font-size: 32px;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star:hover,
.star.hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.star.active {
    color: #fbbf24;
}

.rating-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 8px;
}

.rating-label.active {
    color: var(--primary-blue);
    font-weight: 600;
}

/* ============================================
   Feedback Form Groups
   ============================================ */
.feedback-modal .form-group {
    margin-bottom: 20px;
}

.feedback-modal .form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feedback-modal .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--background-white);
    transition: all var(--transition-speed);
    resize: vertical;
    min-height: 80px;
}

.feedback-modal .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============================================
   Phrase Management Section
   ============================================ */
.feedback-phrases {
    background: var(--background-main);
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.feedback-phrases h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.phrase-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition-speed);
}

.checkbox-label:hover {
    background: var(--background-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
    margin-right: 10px;
}

.checkbox-label span {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.checkbox-label small {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 28px;
}

/* ============================================
   Research Avatar in Dashboard
   ============================================ */
.research-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success-green), #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.research-time {
    font-size: 12px;
    color: var(--text-light);
}

.research-summary {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 6px;
}

/* ============================================
   Results Actions Bar
   ============================================ */
.results-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-container i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-container input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all var(--transition-speed);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.results-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.results-count i {
    color: var(--success-green);
}

/* ============================================
   Responsive Styles for Feedback & Credits
   ============================================ */
@media (max-width: 768px) {
    .feedback-modal {
        width: 95%;
        max-height: 95vh;
    }

    .star {
        font-size: 28px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer button {
        width: 100%;
    }

    .results-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        min-width: 100%;
    }

    .results-info {
        width: 100%;
        justify-content: space-between;
    }

    .icebreaker-actions {
        flex-direction: column;
    }

    .btn-copy,
    .btn-feedback {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .star {
        font-size: 24px;
        gap: 4px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .stat-card.purple .stat-value {
        font-size: 1.5rem;
    }
}
