/* Rating Skeleton Loader */
.rating-skeleton-loader {
    padding: 16px 20px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

/* Skeleton shimmer base - applied to all skeleton elements */
.skeleton-element {
    background: linear-gradient(90deg, #e9e9e9 0%, #f4f4f4 50%, #e9e9e9 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* Header section - Title on left, stats on right */
.rating-skeleton-loader .skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
}

.rating-skeleton-loader .skeleton-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.rating-skeleton-loader .skeleton-title {
    height: 20px;
    width: 60%;
}

.rating-skeleton-loader .skeleton-checkbox {
    height: 14px;
    width: 40%;
}

.rating-skeleton-loader .skeleton-stats-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 20px;
}

.rating-skeleton-loader .skeleton-stat-row {
    height: 16px;
    width: 100px;
}

.rating-skeleton-loader .skeleton-stat-row.large {
    height: 18px;
    width: 110px;
}

/* Dropdown filter */
.rating-skeleton-loader .skeleton-dropdown {
    height: 40px;
    width: 100%;
    margin: 16px 0;
    border-radius: 10px;
}

/* Rating rows */
.rating-skeleton-loader .skeleton-ratings {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.rating-skeleton-loader .skeleton-rating-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.rating-skeleton-loader .skeleton-rating-label {
    height: 14px;
    width: 30%;
}

.rating-skeleton-loader .skeleton-rating-bar {
    height: 20px;
    width: 100%;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Rating container border - applied at page level */
.rating-container-border {
    border: 1px solid #E4E3E1;
    border-radius: 8px;
    background: #fff;
}

.borderdiv {
    border: 1px solid #E4E3E1;
    border-radius: 8px;
}

.bodyTextColor {
    color: var(--bodyTextColor) !important;
}

.borderbottomdiv {
    border-bottom: 1px solid #E4E3E1;
}

.buttonColor {
    color: var(--buttonColor) !important;
}

.buttonBackgroundColor {
    color: var(--ratingUnFilledColor) !important;
}

.buttonBackgroundHalfColor {
    color: var(--buttonColor) !important;
    --fa-secondary-color: var(--buttonBackgroundColor) !important;
}

.memberVerifyCardCustom {
    position: absolute;
    z-index: 999;
    width: 435px;
}

@media (max-width: 775px) {
    .memberVerifyCardCustom {
        width: 180px;
    }
}

.rating-lock-style {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

@media (min-width: 1366px) {
    .rating-lock-style .iconMain i {
        top: unset;
    }
}

.ratingUnFilledColor {
    font-size: 16px;
    color: var(--ratingUnFilledColor) !important;
}

.ratingFilledColor {
    color: var(--ratingFilledColor) !important;
}

.ratingHalfColor {
    color: var(--ratingFilledColor) !important;
    --fa-secondary-color: var(--ratingUnFilledColor) !important;
}
.custom-rating-flex-container {
    display: flex;
    align-items: center;
    justify-self: flex-start;
    gap: 5px;
    position: relative;
}

/* ========== NPS Widget ========== */
.nps-widget { width: 100%; }

.nps-card {
    background: #fff;
    border-radius: 10px;
    padding: clamp(16px, 4vw, 24px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    width: 100%;
}

.nps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.nps-header h3 {
    font-size: clamp(15px, 3.5vw, 16px);
    font-weight: 700;
    color: #222;
    margin: 0;
}
.nps-header h3 span {
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: 400;
    color: #888;
}

.nps-info-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #aaa;
    background: #fff;
    color: #888;
    font-size: 13px;
    font-weight: 600;
    font-style: italic;
    font-family: Georgia, serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}
.nps-info-btn:hover {
    border-color: #c41230;
    color: #c41230;
    background: #fdf0f2;
}

.nps-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
    gap: 12px;
}
.nps-metric { flex: 1; }
.nps-metric:nth-child(2) { text-align: center; }
.nps-metric:last-child { text-align: right; }
.nps-metric-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}
.nps-metric-label {
    font-size: clamp(10px, 2.5vw, 12px);
    color: #888;
    margin-bottom: 4px;
}
.nps-metric-value {
    font-size: clamp(24px, 6vw, 32px);
    font-weight: 700;
    line-height: 1;
}
.nps-metric-value.score { color: #00b894; }
.nps-metric-value.rating { color: #222; }

.nps-resp-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}
.nps-resp-item { flex: 1; }
.nps-resp-item:last-child { text-align: right; }
.nps-resp-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}
.nps-resp-label {
    font-size: clamp(10px, 2.2vw, 11px);
    color: #888;
}
.nps-resp-value {
    font-size: clamp(16px, 4.5vw, 20px);
    font-weight: 700;
    color: #222;
}

.nps-bar-container { margin: 16px 0; }
.nps-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}
.nps-bar .detractors { background: #e17055; }
.nps-bar .passives { background: #fdcb6e; }
.nps-bar .promoters { background: #00b894; }

.nps-breakdown {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    gap: 8px;
}
.nps-break-item { flex: 1; min-width: 0; }
.nps-break-item:nth-child(2) { text-align: center; }
.nps-break-item:last-child { text-align: right; }
.nps-break-label {
    font-size: clamp(10px, 2.5vw, 12px);
    color: #888;
}
.nps-break-pct {
    font-size: clamp(18px, 5vw, 22px);
    font-weight: 700;
}
.nps-break-pct.detract { color: #e17055; }
.nps-break-pct.passive { color: #e2b93b; }
.nps-break-pct.promo { color: #00b894; }
.nps-break-count {
    font-size: clamp(9px, 2.2vw, 11px);
    color: #aaa;
}

/* NPS Modal */
.nps-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1050;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.nps-modal-overlay.active { display: flex; }

.nps-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 520px;
    width: 100%;
    padding: clamp(20px, 5vw, 32px);
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: npsModalIn 0.25s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}
@keyframes npsModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.nps-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.nps-modal-close:hover { color: #333; }

.nps-modal h2 {
    font-size: clamp(17px, 4vw, 20px);
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
    padding-right: 30px;
}
.nps-modal .nps-modal-subtitle {
    font-size: 13px;
    color: #999;
    margin-bottom: 18px;
}
.nps-modal p {
    font-size: clamp(13px, 3vw, 14px);
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

.nps-formula-box {
    background: #f7f8fa;
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
    margin: 18px 0;
    border: 1px solid #eee;
}
.nps-formula-box code {
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 600;
    color: #222;
    font-family: 'SF Mono', Consolas, monospace;
}

.nps-scale-row {
    display: flex;
    gap: 0;
    margin: 18px 0 8px;
    border-radius: 8px;
    overflow: hidden;
}
.nps-scale-item {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    color: #fff;
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: 600;
}
.nps-scale-item.promo { background: #00b894; }
.nps-scale-item.passive { background: #fdcb6e; color: #7a6a00; }
.nps-scale-item.detract { background: #e17055; }

.nps-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-bottom: 16px;
    padding: 0 4px;
}

.nps-range-row {
    display: flex;
    gap: 12px;
    margin: 10px 0;
    flex-wrap: wrap;
}
.nps-range-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
}
.nps-range-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.nps-range-dot.promo { background: #00b894; }
.nps-range-dot.passive { background: #fdcb6e; }
.nps-range-dot.detract { background: #e17055; }

/* NPS Skeleton Loader */
.nps-skeleton-loader {
    background: #fff;
    border-radius: 10px;
    padding: clamp(16px, 4vw, 24px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    width: 100%;
}
.nps-skeleton-loader .skeleton-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.nps-skeleton-loader .skeleton-element {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: npsSkeletonShimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes npsSkeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* NPS wrapper card border (v1 baseline) */
.nps-widget-view {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.nps-widget-view .nps-card,
.nps-widget-view .nps-skeleton-loader {
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: none;
    border-radius: 6px;
}