/**
 * Support Component Enhanced Styles
 * Phase 1: Help Categories, Feedback Forms, Contact Support
 */

/* ============================================================================
   Help Category Cards - Enhanced with Question Counts & Previews
   ============================================================================ */

.help-category-card.enhanced {
    display: flex;
    flex-direction: column;
    min-height: 200px;
    padding: 20px;
    transition: all 0.3s ease;
}

.help-category-card.enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 126, 200, 0.2);
}

.help-category-card .category-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.help-category-card .category-meta {
    flex: 1;
}

.help-category-card .question-count {
    display: inline-block;
    font-size: 11px;
    color: var(--gray-dark, #666);
    background: var(--gray-light, #f5f5f5);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
}

.help-category-card .category-preview {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    font-size: 13px;
    color: var(--text-secondary, #666);
    flex-grow: 1;
}

.help-category-card .category-preview li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light, #eee);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.help-category-card .category-preview li::before {
    content: "• ";
    color: var(--primary-purple, #8B7EC8);
}

.help-category-card .category-preview li:last-child {
    border-bottom: none;
}

.help-category-card .category-action {
    margin-top: auto;
    padding-top: 12px;
    color: var(--primary-purple, #8B7EC8);
    font-weight: 500;
    font-size: 14px;
    text-align: right;
}

/* ============================================================================
   Feedback Forms - Feature, UX, Bug
   ============================================================================ */

.feedback-form {
    max-width: 600px;
    margin: 0 auto;
}

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

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

.feedback-form textarea,
.feedback-form select,
.feedback-form input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feedback-form textarea:focus,
.feedback-form select:focus,
.feedback-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-purple, #8B7EC8);
    box-shadow: 0 0 0 3px rgba(139, 126, 200, 0.15);
}

/* Radio Grid (Feature Area Selection) */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-card:hover {
    border-color: var(--primary-purple, #8B7EC8);
    background: rgba(139, 126, 200, 0.05);
}

.radio-card input[type="radio"] {
    margin: 0;
}

.radio-card input[type="radio"]:checked + span {
    color: var(--primary-purple, #8B7EC8);
    font-weight: 500;
}

.radio-card:has(input:checked) {
    border-color: var(--primary-purple, #8B7EC8);
    background: rgba(139, 126, 200, 0.1);
}

/* Impact Rating (1-5 buttons) */
.impact-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.impact-rating .rating-label {
    font-size: 12px;
    color: var(--gray-dark, #666);
    min-width: 70px;
}

.impact-rating .rating-buttons {
    display: flex;
    gap: 8px;
}

.rating-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 50%;
    background: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-btn:hover {
    border-color: var(--primary-purple, #8B7EC8);
    color: var(--primary-purple, #8B7EC8);
}

.rating-btn.selected {
    border-color: var(--primary-purple, #8B7EC8);
    background: var(--primary-purple, #8B7EC8);
    color: white;
}

/* Emoji Rating (UX feedback) */
.emoji-rating {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 0;
}

.emoji-btn {
    font-size: 32px;
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary-purple, #8B7EC8);
}

.emoji-btn.selected {
    border-color: var(--primary-purple, #8B7EC8);
    background: rgba(139, 126, 200, 0.1);
    transform: scale(1.15);
}

/* Checkbox Grid (UX issues) */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.checkbox-card:hover {
    border-color: var(--primary-purple, #8B7EC8);
    background: rgba(139, 126, 200, 0.05);
}

.checkbox-card:has(input:checked) {
    border-color: var(--primary-purple, #8B7EC8);
    background: rgba(139, 126, 200, 0.1);
}

.checkbox-card input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
}

/* Checkbox Label (single checkbox) */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Blocking Options (Bug form) */
.blocking-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    border-color: var(--primary-purple, #8B7EC8);
    background: rgba(139, 126, 200, 0.05);
}

.radio-option:has(input:checked) {
    border-color: var(--primary-purple, #8B7EC8);
    background: rgba(139, 126, 200, 0.1);
}

.blocking-indicator {
    font-size: 16px;
}

/* ============================================================================
   Contact Support - Enhanced with Urgency & Diagnostics
   ============================================================================ */

.pre-deflection {
    background: var(--gray-light, #f8f9fa);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.pre-deflection p {
    margin: 0 0 12px 0;
    color: var(--text-secondary, #666);
}

.pre-deflection .search-input-container {
    display: flex;
    gap: 10px;
}

.pre-deflection input {
    flex: 1;
}

.divider-text {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color, #ddd);
}

.divider-text span {
    padding: 0 16px;
    color: var(--gray-dark, #666);
    font-size: 14px;
}

/* Urgency Selector */
.urgency-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.urgency-option {
    cursor: pointer;
}

.urgency-option input[type="radio"] {
    display: none;
}

.urgency-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 12px;
    transition: all 0.2s;
}

.urgency-card:hover {
    border-color: var(--primary-purple, #8B7EC8);
    background: rgba(139, 126, 200, 0.05);
}

.urgency-card.selected,
.urgency-option input:checked + .urgency-card {
    border-color: var(--primary-purple, #8B7EC8);
    background: rgba(139, 126, 200, 0.1);
}

.urgency-icon {
    font-size: 24px;
}

.urgency-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.urgency-text small {
    font-size: 12px;
    color: var(--gray-dark, #666);
}

/* Diagnostics Section */
.diagnostics-section {
    background: var(--gray-light, #f8f9fa);
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.diagnostics-preview {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color, #ddd);
}

.diagnostics-preview small {
    color: var(--gray-dark, #666);
    line-height: 1.8;
}

/* Response Times */
.response-times {
    margin-top: 24px;
    padding: 16px;
    background: rgba(139, 126, 200, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-purple, #8B7EC8);
}

.response-times p {
    margin: 0 0 8px 0;
}

.response-times ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.response-times li {
    padding: 4px 0;
    font-size: 13px;
    color: var(--gray-dark, #666);
}

/* Search Suggestions */
.search-suggestions {
    margin-top: 12px;
}

.suggestions-found {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #ddd);
}

.suggestion-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--gray-light, #f8f9fa);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-item:hover {
    background: rgba(139, 126, 200, 0.1);
    transform: translateX(4px);
}

.suggestion-icon {
    font-size: 18px;
}

.suggestion-text {
    font-size: 14px;
}

.suggestion-prompt {
    font-size: 13px;
    color: var(--gray-dark, #666);
    margin-top: 12px;
}

.no-results {
    color: var(--gray-dark, #666);
    font-style: italic;
    padding: 12px;
    background: var(--gray-light, #f8f9fa);
    border-radius: 8px;
}

/* ============================================================================
   Responsive Adjustments
   ============================================================================ */

/* ============================================================================
   Community Feature - Phase 2
   ============================================================================ */

/* Community Tabs */
.community-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 2px solid var(--border-light, #eee);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.community-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, #666);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.community-tab:hover {
    background: rgba(139, 126, 200, 0.1);
    color: var(--primary-purple, #8B7EC8);
}

.community-tab.active {
    background: var(--primary-purple, #8B7EC8);
    color: white;
}

/* Community Intro */
.community-intro {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(139, 126, 200, 0.1), rgba(127, 176, 105, 0.1));
    border-radius: 12px;
    margin-bottom: 24px;
}

.community-intro h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary, #333);
}

.community-intro p {
    margin: 0;
    color: var(--text-secondary, #666);
}

/* Community Input Section */
.community-input-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.community-input-section textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 10px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s;
}

.community-input-section textarea:focus {
    outline: none;
    border-color: var(--primary-purple, #8B7EC8);
}

/* Topic Tags */
.topic-selection {
    margin: 8px 0;
}

.topic-selection label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin-bottom: 10px;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-tag {
    padding: 6px 12px;
    background: var(--gray-light, #f5f5f5);
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.topic-tag:hover {
    background: rgba(139, 126, 200, 0.15);
    border-color: var(--primary-purple, #8B7EC8);
}

.topic-tag.selected {
    background: var(--primary-purple, #8B7EC8);
    color: white;
    border-color: var(--primary-purple, #8B7EC8);
}

.topic-badge {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(139, 126, 200, 0.15);
    color: var(--primary-purple, #8B7EC8);
    border-radius: 12px;
    font-size: 11px;
    margin-right: 4px;
    margin-bottom: 4px;
}

/* Processing State */
.processing {
    text-align: center;
    padding: 40px 20px;
}

.processing .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-light, #f5f5f5);
    border-top-color: var(--primary-purple, #8B7EC8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.processing p {
    color: var(--text-secondary, #666);
    margin: 0;
}

/* Community Results */
.community-results {
    margin-top: 24px;
}

.community-matches {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color, #ddd);
    overflow: hidden;
}

.ai-response-section {
    padding: 20px;
    background: linear-gradient(135deg, rgba(139, 126, 200, 0.05), rgba(127, 176, 105, 0.05));
    border-bottom: 1px solid var(--border-color, #ddd);
}

.ai-response-section h4 {
    margin: 0 0 12px 0;
    color: var(--primary-purple, #8B7EC8);
}

.blossom-response-box {
    display: flex;
    gap: 12px;
    background: white;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blossom-avatar-small {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-purple, #8B7EC8), var(--primary-green, #7FB069));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.blossom-response-box .response-text {
    flex: 1;
    line-height: 1.6;
    color: var(--text-primary, #333);
}

.community-cloud-status {
    padding: 20px;
    border-bottom: 1px solid var(--border-color, #ddd);
}

.community-cloud-status h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary, #333);
}

.cloud-message {
    margin: 0 0 16px 0;
    color: var(--text-secondary, #666);
}

.cloud-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 16px;
    background: var(--gray-light, #f5f5f5);
}

.indicator.active {
    background: rgba(127, 176, 105, 0.15);
    color: var(--primary-green, #7FB069);
}

.indicator.pending {
    background: rgba(255, 193, 7, 0.15);
    color: #f57c00;
}

.community-actions {
    padding: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Question Cards */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-card,
.pending-question-card {
    background: white;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow 0.2s;
}

.question-card:hover,
.pending-question-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.question-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.question-status.status-active {
    background: rgba(33, 150, 243, 0.15);
    color: #1976d2;
}

.question-status.status-resolved {
    background: rgba(76, 175, 80, 0.15);
    color: #388e3c;
}

.question-status.status-archived {
    background: var(--gray-light, #f5f5f5);
    color: var(--gray-dark, #666);
}

.question-date {
    font-size: 12px;
    color: var(--gray-dark, #666);
}

.question-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary, #333);
    margin-bottom: 12px;
}

.question-text-full {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary, #333);
    margin: 12px 0;
}

.question-topics {
    margin-bottom: 12px;
}

.question-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.question-stats .stat {
    font-size: 13px;
    color: var(--gray-dark, #666);
}

.ai-preview {
    background: var(--gray-light, #f5f5f5);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin-bottom: 12px;
}

.view-responses-btn {
    padding: 0;
    font-size: 14px;
    color: var(--primary-purple, #8B7EC8);
}

/* Question Detail View */
.question-detail-view {
    padding: 0;
}

.question-detail-view .back-btn {
    padding: 0;
    margin-bottom: 20px;
    color: var(--text-secondary, #666);
}

.question-full {
    background: white;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.ai-response-full {
    margin-bottom: 24px;
}

.ai-response-full h4 {
    margin: 0 0 12px 0;
    color: var(--primary-purple, #8B7EC8);
}

.community-responses {
    margin-bottom: 24px;
}

.community-responses h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary, #333);
}

/* Response Cards */
.response-card {
    background: white;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.response-card.is-helpful {
    border-color: var(--primary-green, #7FB069);
    background: rgba(127, 176, 105, 0.05);
}

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

.responder-name {
    font-weight: 500;
    color: var(--text-primary, #333);
}

.response-date {
    font-size: 12px;
    color: var(--gray-dark, #666);
}

.response-text {
    line-height: 1.6;
    color: var(--text-primary, #333);
    margin-bottom: 12px;
}

.response-actions {
    display: flex;
    justify-content: flex-end;
}

.helpful-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(127, 176, 105, 0.15);
    color: var(--primary-green, #7FB069);
    border-radius: 12px;
    font-size: 13px;
}

.no-responses {
    text-align: center;
    padding: 32px;
    background: var(--gray-light, #f5f5f5);
    border-radius: 10px;
    color: var(--gray-dark, #666);
}

.mark-resolved-section {
    text-align: center;
    padding: 24px;
    background: rgba(127, 176, 105, 0.1);
    border-radius: 12px;
}

.mark-resolved-section p {
    margin: 0 0 12px 0;
    color: var(--text-secondary, #666);
}

/* Respond Section */
.respond-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light, #eee);
}

.response-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 12px;
}

.response-input:focus {
    outline: none;
    border-color: var(--primary-purple, #8B7EC8);
}

/* Community Settings */
.community-settings {
    max-width: 600px;
}

.settings-form {
    background: white;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

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

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

.settings-form input[type="text"],
.settings-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    font-size: 14px;
}

.settings-form input[type="text"]:focus,
.settings-form select:focus {
    outline: none;
    border-color: var(--primary-purple, #8B7EC8);
}

.subscription-topics {
    margin-top: 8px;
}

/* Community Stats */
.community-stats-section {
    background: white;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 12px;
    padding: 24px;
}

.community-stats-section h4 {
    margin: 0 0 20px 0;
    color: var(--text-primary, #333);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--gray-light, #f5f5f5);
    border-radius: 10px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-purple, #8B7EC8);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-dark, #666);
}

.badges-section {
    padding-top: 20px;
    border-top: 1px solid var(--border-light, #eee);
}

.badges-section h5 {
    margin: 0 0 12px 0;
    color: var(--text-primary, #333);
}

.badges-section.empty {
    text-align: center;
}

.badges-section.empty p {
    color: var(--gray-dark, #666);
    font-size: 14px;
}

.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(139, 126, 200, 0.1), rgba(127, 176, 105, 0.1));
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-primary, #333);
}

.champion-badge {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: #654c00;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--gray-light, #f5f5f5);
    border-radius: 12px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary, #333);
}

.empty-state p {
    margin: 0 0 20px 0;
    color: var(--gray-dark, #666);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--gray-dark, #666);
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 24px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 10px;
    color: #c62828;
}

/* Section Header */
.section-header {
    margin-bottom: 24px;
}

.section-header h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary, #333);
}

.section-header p {
    margin: 0;
    color: var(--gray-dark, #666);
    font-size: 14px;
}

/* Asker Name */
.asker-name {
    font-weight: 500;
    color: var(--primary-purple, #8B7EC8);
}

/* Button Variations */
.btn-success {
    background: var(--primary-green, #7FB069);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-success:hover {
    background: #6a9a58;
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--primary-purple, #8B7EC8);
    cursor: pointer;
    font-size: 14px;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color, #ddd);
    color: var(--text-primary, #333);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--primary-purple, #8B7EC8);
    color: var(--primary-purple, #8B7EC8);
}

/* ============================================================================
   Responsive Adjustments
   ============================================================================ */

@media (max-width: 768px) {
    .radio-grid,
    .checkbox-grid,
    .urgency-selector {
        grid-template-columns: 1fr;
    }

    .impact-rating {
        flex-direction: column;
        align-items: flex-start;
    }

    .impact-rating .rating-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .emoji-rating {
        gap: 8px;
    }

    .emoji-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .help-category-card .category-preview {
        display: none;
    }

    /* Community responsive */
    .community-tabs {
        gap: 4px;
    }

    .community-tab {
        padding: 8px 12px;
        font-size: 13px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-item {
        padding: 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    .cloud-indicators {
        flex-direction: column;
        gap: 8px;
    }

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

    .community-actions .btn {
        width: 100%;
    }
}

/* =============================================================================
   Community Notification Animations (Phase 3)
   ============================================================================= */

/* Badge celebration animation */
.badges-section.badge-celebration {
    animation: badge-glow 1.5s ease-in-out;
}

@keyframes badge-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 126, 200, 0);
    }
    25% {
        box-shadow: 0 0 20px 8px rgba(139, 126, 200, 0.4);
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 0 30px 12px rgba(127, 176, 105, 0.3);
    }
    75% {
        box-shadow: 0 0 20px 8px rgba(139, 126, 200, 0.4);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 126, 200, 0);
        transform: scale(1);
    }
}

/* New notification indicator pulse */
.community-tab.has-new::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--primary-green, #7FB069);
    border-radius: 50%;
    animation: notification-pulse 2s infinite;
}

@keyframes notification-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Question card highlight for new response */
.question-card.new-response {
    animation: highlight-card 2s ease-out;
}

@keyframes highlight-card {
    0% {
        background: rgba(139, 126, 200, 0.2);
        border-color: var(--primary-purple, #8B7EC8);
    }
    100% {
        background: var(--white, #fff);
        border-color: var(--border-color, #ddd);
    }
}

/* Response card highlight for helpful marking */
.response-card.marked-helpful {
    animation: helpful-highlight 1.5s ease-out;
}

@keyframes helpful-highlight {
    0% {
        background: rgba(127, 176, 105, 0.3);
    }
    100% {
        background: var(--white, #fff);
    }
}

/* ============================================================================
   Phase 5 Polish: Skeleton Loading Screens
   ============================================================================ */

/* Base skeleton animation */
@keyframes skeleton-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        opacity: 1;
    }
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-light, #f0f0f0) 0px,
        #e8e8e8 40px,
        var(--gray-light, #f0f0f0) 80px
    );
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-text.medium {
    width: 70%;
}

.skeleton-text.long {
    width: 100%;
}

/* Question card skeleton */
.skeleton-question-card {
    background: var(--white, #fff);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.skeleton-question-card .skeleton-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.skeleton-question-card .skeleton-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.skeleton-question-card .skeleton-meta {
    flex: 1;
    margin-left: 12px;
}

.skeleton-question-card .skeleton-body {
    margin-bottom: 16px;
}

.skeleton-question-card .skeleton-footer {
    display: flex;
    gap: 12px;
}

.skeleton-question-card .skeleton-tag {
    width: 60px;
    height: 24px;
    border-radius: 12px;
}

/* Stats skeleton */
.skeleton-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.skeleton-stat-card {
    background: var(--white, #fff);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.skeleton-stat-card .skeleton-number {
    width: 50px;
    height: 32px;
    margin: 0 auto 8px;
    border-radius: 6px;
}

.skeleton-stat-card .skeleton-label {
    width: 80px;
    height: 12px;
    margin: 0 auto;
    border-radius: 4px;
}

/* ============================================================================
   Phase 5 Polish: Enhanced Error States
   ============================================================================ */

.error-state {
    text-align: center;
    padding: 40px 24px;
    background: rgba(244, 67, 54, 0.05);
    border: 1px solid rgba(244, 67, 54, 0.2);
    border-radius: 12px;
}

.error-state .error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-state h4 {
    margin: 0 0 8px 0;
    color: #c62828;
}

.error-state p {
    margin: 0 0 20px 0;
    color: var(--gray-dark, #666);
}

.error-state .btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-purple, #8B7EC8);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.error-state .btn-retry:hover {
    background: #7a6db8;
    transform: translateY(-1px);
}

.error-state .btn-retry .retry-icon {
    transition: transform 0.3s;
}

.error-state .btn-retry:hover .retry-icon {
    transform: rotate(180deg);
}

/* Inline error for forms */
.inline-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
    color: #c62828;
    font-size: 14px;
}

.inline-error .error-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: #c62828;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.inline-error .error-dismiss:hover {
    opacity: 1;
}

/* ============================================================================
   Phase 5 Polish: Enhanced Empty States
   ============================================================================ */

.empty-state.illustrated {
    position: relative;
    overflow: hidden;
}

.empty-state.illustrated::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(139, 126, 200, 0.1), rgba(127, 176, 105, 0.1));
    border-radius: 50%;
}

.empty-state .action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state .btn-secondary {
    background: transparent;
    color: var(--primary-purple, #8B7EC8);
    border: 2px solid var(--primary-purple, #8B7EC8);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.empty-state .btn-secondary:hover {
    background: rgba(139, 126, 200, 0.1);
}

/* ============================================================================
   Phase 5 Polish: Badge Celebration Animation
   ============================================================================ */

@keyframes badge-earned {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(10deg);
    }
    70% {
        transform: scale(0.9) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes badge-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(139, 126, 200, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(139, 126, 200, 0.2);
    }
}

.badge-item.newly-earned {
    animation: badge-earned 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards,
               badge-glow 2s ease-in-out 0.6s 3;
}

.badge-celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white, #fff);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: celebration-pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes celebration-pop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.badge-celebration .badge-icon-large {
    font-size: 64px;
    margin-bottom: 16px;
    animation: badge-earned 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s both;
}

.badge-celebration h3 {
    margin: 0 0 8px 0;
    color: var(--primary-purple, #8B7EC8);
    font-size: 24px;
}

.badge-celebration p {
    margin: 0 0 20px 0;
    color: var(--gray-dark, #666);
}

.badge-celebration .btn-celebrate {
    background: linear-gradient(135deg, var(--primary-purple, #8B7EC8), var(--primary-green, #7FB069));
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.badge-celebration .btn-celebrate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 126, 200, 0.4);
}

.badge-celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Confetti particles */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10001;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}
