/* ========================================
   GreenStep Hub - Feedback Module Styles
   ======================================== */

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.feedback-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.feedback-subtitle {
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
    margin-top: 4px;
}

.feedback-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Tabs */
.feedback-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border, #e2e8f0);
    background: #f8fafc;
}

.feedback-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s;
}

.feedback-tab:hover {
    background: #ecfdf5;
}

.feedback-tab.active {
    background: #059669;
    color: white;
}

/* Stats Cards */
.feedback-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.feedback-stat-card {
    flex: 1;
    min-width: 120px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border, #e2e8f0);
}

.feedback-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #059669;
}

.feedback-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary, #64748b);
    margin-top: 4px;
}

/* Table */
.feedback-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border, #e2e8f0);
    overflow: hidden;
}

.feedback-table {
    width: 100%;
    border-collapse: collapse;
}

.feedback-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: right;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.feedback-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.feedback-table tbody tr:hover {
    background: #f0fdf4;
}

.feedback-avg-badge {
    font-weight: 700;
    font-size: 1rem;
}

.feedback-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}

.feedback-action-btn:hover {
    background: #fee2e2;
}

/* Empty State */
.feedback-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.feedback-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.feedback-empty h3 {
    font-size: 1.2rem;
    color: var(--text-primary, #1e293b);
    margin-bottom: 8px;
}

.feedback-empty p {
    color: var(--text-secondary, #64748b);
    margin-bottom: 16px;
}

/* Detail Modal */
.feedback-detail-info {
    margin-bottom: 20px;
}

.feedback-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.feedback-detail-row strong {
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}

.feedback-detail-ratings-section {
    margin-bottom: 20px;
}

.feedback-detail-ratings-section h3 {
    font-size: 1rem;
    color: #059669;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d1fae5;
}

.feedback-detail-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8fafc;
}

.feedback-detail-rating-label {
    font-weight: 500;
    color: var(--text-primary, #1e293b);
    font-size: 0.9rem;
}

.feedback-detail-rating-value {
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.feedback-detail-comments {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
}

.feedback-detail-comments h3 {
    font-size: 0.95rem;
    color: var(--text-primary, #1e293b);
    margin-bottom: 8px;
}

.feedback-detail-comments p {
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ============ Custom Templates ============ */

.custom-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* Year group sections */
.template-year-group {
    margin-bottom: 28px;
}

.template-year-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 16px;
    user-select: none;
    transition: background 0.15s;
}

.template-year-header:hover {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.template-year-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #15803d;
}

.template-year-count {
    font-size: 0.82rem;
    color: #16a34a;
    background: white;
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid #86efac;
}

.template-year-toggle {
    margin-right: auto;
    color: #16a34a;
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.template-year-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.custom-template-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    padding: 20px;
    transition: box-shadow 0.2s;
}

.custom-template-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

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

.custom-template-card-header h3 {
    font-size: 1.05rem;
    color: var(--text-primary, #1e293b);
    font-weight: 600;
}

.custom-template-badge {
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.custom-template-badge.active {
    background: #ecfdf5;
    color: #059669;
}

.custom-template-badge.inactive {
    background: #fef2f2;
    color: #dc2626;
}

.custom-template-card-info {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
    margin-bottom: 16px;
}

.custom-template-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
}

/* Builder Question */
.builder-question {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}

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

.builder-question-num {
    background: #059669;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.builder-question-delete {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #dc2626;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.builder-question-delete:hover {
    color: #991b1b;
}

.builder-question-fields {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
