/* ============================================================
   MegaForm Widget: Rating Suite v2.0
   Covers: Star Rating, Likert Scale, NPS
   ============================================================ */

/* ─── STAR RATING ─────────────────────────────────────── */
.mfw-rating-wrap { padding: 4px 0; }
.mfw-rating-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.mfw-rating-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 11px;
    color: #9ca3af;
}
.mfw-rating-items {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}
.mfw-rating-item {
    transition: all .15s ease;
    user-select: none;
    line-height: 1;
}
.mfw-rating-item:hover {
    transform: scale(1.2) !important;
}
.mfw-rating-item:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    border-radius: 4px;
}
.mfw-rating-item.active {
    color: #fbbf24 !important;
}
.mfw-rating-value {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    min-height: 18px;
}


/* ─── LIKERT SCALE ────────────────────────────────────── */
.mfw-likert-wrap { margin-bottom: 4px; }
.mfw-likert-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}
.mfw-likert-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.mfw-likert-table {
    width: 100%;
    border-collapse: collapse;
}
.mfw-likert-table thead {
    background: #f9fafb;
}
.mfw-likert-corner {
    min-width: 150px;
}
.mfw-likert-col-header {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    padding: 10px 8px;
    min-width: 70px;
    border-bottom: 1px solid #e5e7eb;
}
.mfw-likert-row-label {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    padding: 12px 14px;
    min-width: 150px;
    border-bottom: 1px solid #f3f4f6;
}
.mfw-likert-row-even {
    background: #fafafa;
}
.mfw-likert-cell {
    text-align: center;
    padding: 10px 8px;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
}
.mfw-likert-cell:hover {
    background: #f5f3ff;
}
.mfw-likert-cell.mfw-likert-selected {
    background: #ede9fe;
}
.mfw-likert-cell input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #4f46e5;
    cursor: pointer;
}


/* ─── NPS ─────────────────────────────────────────────── */
.mfw-nps-wrap {
    padding: 4px 0;
}
.mfw-nps-question {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    line-height: 1.4;
}
.mfw-nps-scale {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.mfw-nps-btn {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Detractors (0-6): red */
.mfw-nps-btn.detractor {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.mfw-nps-btn.detractor:hover {
    background: #fee2e2;
    border-color: #f87171;
    transform: translateY(-2px);
}
.mfw-nps-btn.detractor.selected {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, .3);
}

/* Passives (7-8): yellow/amber */
.mfw-nps-btn.passive {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}
.mfw-nps-btn.passive:hover {
    background: #fef3c7;
    border-color: #fbbf24;
    transform: translateY(-2px);
}
.mfw-nps-btn.passive.selected {
    background: #d97706;
    color: #fff;
    border-color: #d97706;
    box-shadow: 0 2px 8px rgba(217, 119, 6, .3);
}

/* Promoters (9-10): green */
.mfw-nps-btn.promoter {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}
.mfw-nps-btn.promoter:hover {
    background: #d1fae5;
    border-color: #34d399;
    transform: translateY(-2px);
}
.mfw-nps-btn.promoter.selected {
    background: #059669;
    color: #fff;
    border-color: #059669;
    box-shadow: 0 2px 8px rgba(5, 150, 105, .3);
}

/* Labels */
.mfw-nps-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
}

/* Feedback message */
.mfw-nps-feedback {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mfw-nps-feedback.detractor {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.mfw-nps-feedback.passive {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.mfw-nps-feedback.promoter {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.mfw-nps-fb-icon {
    font-size: 20px;
}

/* Responsive */
@media (max-width: 480px) {
    .mfw-nps-btn { width: 34px; height: 34px; font-size: 12px; border-radius: 8px; }
    .mfw-nps-scale { gap: 3px; }
    .mfw-likert-col-header { font-size: 10px; min-width: 50px; padding: 8px 4px; }
    .mfw-likert-row-label { font-size: 12px; min-width: 100px; padding: 10px 8px; }
    .mfw-rating-item { font-size: 24px !important; }
}
