/* ==========================================================================
   Review Summary Styles - Unified Grid System & 20 Premium Skins
   (Updated: Pure CSS Animation - Bug Free)
   ========================================================================== */

.mt-review-summary-wrapper {
    --mt-sum-primary: #ef4056;
    --mt-sum-track: #f1f1f1;
    --mt-sum-text: #333;
    --mt-item-color: var(--mt-sum-primary);
    
    font-family: inherit;
    direction: rtl;
    text-align: right;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 30px;
}

.mt-review-summary-wrapper * {
    box-sizing: border-box;
}

/* --- Main Card Container (Base) --- */
.mt-sum-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    display: flex;
    gap: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* --- Global Positioning (RTL Logic) --- */
.mt-pos-right .mt-sum-card { flex-direction: row; }
.mt-pos-left .mt-sum-card { flex-direction: row-reverse; }
.mt-pos-top .mt-sum-card { flex-direction: column; align-items: center; }
.mt-pos-bottom .mt-sum-card { flex-direction: column-reverse; align-items: center; }

/* --- Total Score Box --- */
.mt-sum-head {
    flex: 0 0 auto;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
    border-radius: 12px;
}

.mt-pos-right .mt-sum-head { border-left: 1px solid #f0f0f1; padding-left: 30px; }
.mt-pos-left .mt-sum-head { border-right: 1px solid #f0f0f1; padding-right: 30px; }
.mt-pos-top .mt-sum-head { border-bottom: 1px solid #f0f0f1; padding-bottom: 25px; width: 100%; }
.mt-pos-bottom .mt-sum-head { border-top: 1px solid #f0f0f1; padding-top: 25px; width: 100%; }

.mt-score-wrap { display: flex; align-items: baseline; justify-content: center; line-height: 1; }
.mt-total-val { font-size: 3.5rem; font-weight: 800; color: var(--mt-sum-text); }
.mt-total-suffix { font-size: 1rem; color: #888; font-weight: 400; margin-right: 5px; }
.mt-stars { color: #FFC107; font-size: 1.3rem; margin: 8px 0; letter-spacing: 2px; }
.mt-count { font-size: 0.85rem; color: #999; }

/* --- Body & Grid System --- */
.mt-sum-body {
    flex: 1;
    width: 100%;
    display: grid;
    gap: 20px;
    align-content: center;
}

/* --- Individual Item Layout --- */
.mt-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

/* Label Positioning: Side */
.mt-lbl-layout-side .mt-item {
    flex-direction: row;
    align-items: center;
    gap: 15px;
}
.mt-lbl-layout-side .mt-header-row {
    flex-direction: column; 
    align-items: flex-start; 
    width: auto;
    min-width: 100px;
    margin-bottom: 0;
}
.mt-lbl-layout-side .mt-bar-row {
    flex-grow: 1;
}

/* --- Header Row --- */
.mt-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    margin-bottom: 8px;
    width: 100%;
}
.mt-label { font-size: 0.95rem; font-weight: 600; color: var(--mt-sum-text); }
.mt-top-meta { font-size: 0.85rem; font-weight: bold; color: var(--mt-sum-text); }

/* --- Bar Row --- */
.mt-bar-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}
.mt-bar-area {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.mt-end-meta {
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--mt-sum-text);
    min-width: 35px;
    text-align: left;
}

/* ==========================================================================
   PURE CSS ANIMATIONS (Fixed the empty bars bug)
   ========================================================================== */

@keyframes mtFillWidth {
    0% { width: 0%; }
    100% { width: var(--w); }
}

@keyframes mtFillCircle {
    0% { stroke-dasharray: 0, 100; }
    100% { stroke-dasharray: var(--w), 100; }
}

/* --- Bar Types & Shapes --- */

/* 1. Line Progress Bar */
.mt-type-line .mt-prog-track {
    width: 100%;
    height: 8px;
    background: var(--mt-sum-track);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: block;
}
.mt-type-line .mt-prog-fill {
    height: 100%;
    background: var(--mt-item-color);
    border-radius: 10px;
    display: block;
    /* اعمال انیمیشن با CSS خالص */
    animation: mtFillWidth 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 2. Circle Chart */
.mt-type-circle .mt-bar-area { display: flex; justify-content: center; min-height: 50px; }
.mt-type-circle .mt-circle-chart { position: relative; width: 50px; height: 50px; margin: 0 auto; }
.mt-type-circle svg { width: 100%; height: 100%; transform: rotate(180deg); display: block; }
.mt-circle-bg { fill: none; stroke: var(--mt-sum-track); stroke-width: 3; }
.mt-circle-fill {
    fill: none; 
    stroke: var(--mt-item-color); 
    stroke-width: 3; 
    stroke-linecap: round;
    /* اعمال انیمیشن با CSS خالص */
    animation: mtFillCircle 1.5s ease forwards;
}
.mt-circle-text {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 10px; font-weight: bold; color: var(--mt-sum-text);
}

/* 3. Blocks (Dots/Square/Stars) */
.mt-blocks-wrap { display: flex; gap: 4px; width: 100%; }
.mt-block { flex: 1; height: 12px; background: var(--mt-sum-track); transition: background 0.3s; }
.mt-block.filled { background: var(--mt-item-color); }

.mt-type-dots .mt-block { width: 12px; height: 12px; flex: 0 0 auto; border-radius: 50%; }
.mt-type-square .mt-block { border-radius: 2px; }
.mt-type-stars .mt-block {
    width: 18px; height: 18px; flex: 0 0 auto; background-color: var(--mt-sum-track);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.mt-type-stars .mt-block.filled { background-color: var(--mt-item-color); }

/* Responsive Base */
@media (max-width: 768px) {
    .mt-sum-card { flex-direction: column !important; padding: 20px; gap: 20px; }
    .mt-sum-head { border: none !important; border-bottom: 1px solid #eee !important; padding: 0 0 20px 0 !important; width: 100%; }
}

/* ==========================================================================
   20 PREMIUM SKINS (The Magic Happens Here)
   ========================================================================== */

/* Skin 1: Digikala Classic */
.mt-skin-style_1 {
    --mt-sum-primary: #ef4056;
    --mt-sum-text: #3f4064;
    --mt-sum-track: #f1f2f4;
}

/* Skin 2: Glassmorphism */
.mt-skin-style_2 .mt-sum-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}
.mt-skin-style_2 { --mt-sum-primary: #007bff; --mt-sum-track: rgba(255,255,255,0.4); }

/* Skin 3: Amazon Distribution */
.mt-skin-style_3 { --mt-sum-primary: #FFA41C; --mt-sum-track: #F0F2F2; --mt-sum-text: #0F1111; }
.mt-skin-style_3 .mt-prog-track, .mt-skin-style_3 .mt-prog-fill { border-radius: 2px; height: 14px; }
.mt-skin-style_3 .mt-sum-card { border: 1px solid #D5D9D9; box-shadow: none; }
.mt-skin-style_3 .mt-label { color: #007185; }

/* Skin 4: Dark Gaming Neon */
.mt-skin-style_4 .mt-sum-card { background: #121212; border: 1px solid #333; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.mt-skin-style_4 { --mt-sum-primary: #00ffcc; --mt-sum-text: #fff; --mt-sum-track: #2a2a2a; }
.mt-skin-style_4 .mt-prog-fill { box-shadow: 0 0 10px var(--mt-item-color); }
.mt-skin-style_4 .mt-count, .mt-skin-style_4 .mt-total-suffix { color: #888; }

/* Skin 5: Apple Minimal */
.mt-skin-style_5 .mt-sum-card { background: #f5f5f7; border-radius: 24px; box-shadow: none; }
.mt-skin-style_5 { --mt-sum-primary: #0071e3; --mt-sum-text: #1d1d1f; --mt-sum-track: #e8e8ed; }
.mt-skin-style_5 .mt-prog-track, .mt-skin-style_5 .mt-prog-fill { border-radius: 12px; height: 6px; }

/* Skin 6: AliExpress Vibrant */
.mt-skin-style_6 { --mt-sum-primary: #ff4747; --mt-sum-text: #222; }
.mt-skin-style_6 .mt-prog-fill { background: linear-gradient(90deg, #ff7a00, #ff4747); }
.mt-skin-style_6 .mt-sum-card { border-radius: 16px; box-shadow: 0 10px 25px rgba(255, 71, 71, 0.1); }

/* Skin 7: Bento Box Grid */
.mt-skin-style_7 .mt-sum-card { background: #f0f2f5; box-shadow: none; gap: 15px; padding: 15px; }
.mt-skin-style_7 .mt-item { background: #fff; padding: 15px; border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.mt-skin-style_7 .mt-sum-head { background: #fff; border-radius: 16px; border: none; box-shadow: 0 2px 10px rgba(0,0,0,0.03); margin: 0; }
.mt-skin-style_7 { --mt-sum-primary: #6366f1; --mt-sum-track: #eef2ff; }

/* Skin 8: Pill Soft */
.mt-skin-style_8 .mt-sum-card { border-radius: 50px; padding: 25px 40px; }
.mt-skin-style_8 { --mt-sum-primary: #f43f5e; --mt-sum-track: #ffe4e6; }
.mt-skin-style_8 .mt-prog-track, .mt-skin-style_8 .mt-prog-fill { border-radius: 50px; height: 10px; }
@media(max-width:768px) { .mt-skin-style_8 .mt-sum-card { border-radius: 25px; padding: 25px; } }

/* Skin 9: Neumorphism 3D */
.mt-skin-style_9 .mt-sum-card {
    background: #e0e5ec;
    box-shadow: 9px 9px 16px rgba(163, 177, 198, 0.6), -9px -9px 16px rgba(255, 255, 255, 0.5);
    border: none;
}
.mt-skin-style_9 { --mt-sum-primary: #4a90e2; --mt-sum-track: #e0e5ec; --mt-sum-text: #4a4a4a; }
.mt-skin-style_9 .mt-prog-track { box-shadow: inset 3px 3px 6px rgba(163,177,198,0.5), inset -3px -3px 6px rgba(255,255,255,0.5); }
.mt-skin-style_9 .mt-prog-fill { box-shadow: 2px 2px 5px rgba(74, 144, 226, 0.4); }
.mt-skin-style_9 .mt-sum-head { border: none !important; }

/* Skin 10: TripAdvisor Bubbles */
.mt-skin-style_10 { --mt-sum-primary: #34e0a1; --mt-sum-text: #000; --mt-sum-track: #e5e5e5; }
.mt-skin-style_10 .mt-prog-fill { background: #34e0a1; }
.mt-skin-style_10 .mt-stars { color: #34e0a1; }

/* Skin 11: Booking Blue Trust */
.mt-skin-style_11 .mt-sum-card { background: #003580; color: #fff; }
.mt-skin-style_11 { --mt-sum-primary: #febb02; --mt-sum-text: #fff; --mt-sum-track: #00224f; }
.mt-skin-style_11 .mt-total-val { background: #00224f; padding: 10px 20px; border-radius: 8px; border: 1px solid #febb02; }
.mt-skin-style_11 .mt-count, .mt-skin-style_11 .mt-total-suffix { color: #ccc; }
.mt-skin-style_11 .mt-sum-head { border-color: rgba(255,255,255,0.1) !important; }

/* Skin 12: Airbnb Clean */
.mt-skin-style_12 { --mt-sum-primary: #FF385C; --mt-sum-text: #222222; --mt-sum-track: #DDDDDD; }
.mt-skin-style_12 .mt-sum-card { border: none; box-shadow: none; border-bottom: 1px solid #ebebeb; border-radius: 0; padding: 25px 0; }
.mt-skin-style_12 .mt-prog-track, .mt-skin-style_12 .mt-prog-fill { height: 4px; }
.mt-skin-style_12 .mt-sum-head { border: none !important; padding: 0 !important; }
.mt-skin-style_12 .mt-total-val { font-size: 2.5rem; }

/* Skin 13: Google Material */
.mt-skin-style_13 .mt-sum-card { box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); border-radius: 8px; }
.mt-skin-style_13 { --mt-sum-primary: #1a73e8; --mt-sum-track: #e8eaed; --mt-sum-text: #202124; }
.mt-skin-style_13 .mt-prog-track { border-radius: 0; }
.mt-skin-style_13 .mt-prog-fill { border-radius: 0; }

/* Skin 14: Pie Chart Stats (Dark Mode) */
.mt-skin-style_14 .mt-sum-card { background: #1e1e2d; border-radius: 20px; }
.mt-skin-style_14 { --mt-sum-primary: #f64e60; --mt-sum-track: #2b2b40; --mt-sum-text: #ffffff; }
.mt-skin-style_14 .mt-count, .mt-skin-style_14 .mt-total-suffix { color: #a1a5b7; }
.mt-skin-style_14 .mt-sum-head { border-color: #2b2b40 !important; }

/* Skin 15: Spotify Dark Vibe */
.mt-skin-style_15 .mt-sum-card { background: #191414; box-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.mt-skin-style_15 { --mt-sum-primary: #1db954; --mt-sum-text: #ffffff; --mt-sum-track: #333333; }
.mt-skin-style_15 .mt-label { font-weight: bold; letter-spacing: 0.5px; }
.mt-skin-style_15 .mt-count, .mt-skin-style_15 .mt-total-suffix { color: #b3b3b3; }
.mt-skin-style_15 .mt-sum-head { border-color: #333 !important; }

/* Skin 16: Flat Colorful UI */
.mt-skin-style_16 .mt-sum-card { border: 2px solid #000; border-radius: 12px; box-shadow: 6px 6px 0px #000; }
.mt-skin-style_16 { --mt-sum-primary: #8b5cf6; --mt-sum-track: #f3f4f6; --mt-sum-text: #000; }
.mt-skin-style_16 .mt-prog-track { border: 1px solid #000; border-radius: 0; }
.mt-skin-style_16 .mt-prog-fill { border-radius: 0; border-right: 1px solid #000; }
.mt-skin-style_16 .mt-sum-head { border-color: #000 !important; }

/* Skin 17: 3D Soft Shadow */
.mt-skin-style_17 .mt-sum-card { background: #fafafa; border-radius: 20px; }
.mt-skin-style_17 { --mt-sum-primary: #ff8a65; --mt-sum-track: #eeeeee; --mt-sum-text: #37474f; }
.mt-skin-style_17 .mt-prog-track { box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); height: 12px; }
.mt-skin-style_17 .mt-prog-fill { box-shadow: 0 3px 6px rgba(255, 138, 101, 0.4); }

/* Skin 18: Compact Shop (For Sidebars) */
.mt-skin-style_18 .mt-sum-card { padding: 15px; gap: 15px; border-radius: 8px; border: 1px solid #eee; box-shadow: none; }
.mt-skin-style_18 .mt-sum-head { padding: 10px; min-width: 120px; }
.mt-skin-style_18 .mt-total-val { font-size: 2.2rem; }
.mt-skin-style_18 .mt-label, .mt-skin-style_18 .mt-top-meta { font-size: 0.8rem; }
.mt-skin-style_18 .mt-prog-track, .mt-skin-style_18 .mt-prog-fill { height: 5px; }

/* Skin 19: Analytics Dashboard */
.mt-skin-style_19 .mt-sum-card { background: #0f172a; border-radius: 16px; border: 1px solid #1e293b; }
.mt-skin-style_19 { --mt-sum-primary: #38bdf8; --mt-sum-text: #f8fafc; --mt-sum-track: #1e293b; }
.mt-skin-style_19 .mt-prog-fill { background: linear-gradient(90deg, #0284c7, #38bdf8); box-shadow: 0 0 12px rgba(56, 189, 248, 0.5); }
.mt-skin-style_19 .mt-count, .mt-skin-style_19 .mt-total-suffix { color: #94a3b8; }
.mt-skin-style_19 .mt-sum-head { border-color: #1e293b !important; }

/* Skin 20: Extreme Gradient */
.mt-skin-style_20 .mt-sum-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border-radius: 20px; box-shadow: 0 15px 35px rgba(118, 75, 162, 0.3);
}
.mt-skin-style_20 { --mt-sum-primary: #ffffff; --mt-sum-text: #ffffff; --mt-sum-track: rgba(255,255,255,0.2); }
.mt-skin-style_20 .mt-prog-fill { background: #ffffff; box-shadow: 0 0 10px rgba(255,255,255,0.5); }
.mt-skin-style_20 .mt-count, .mt-skin-style_20 .mt-total-suffix { color: rgba(255,255,255,0.7); }
.mt-skin-style_20 .mt-sum-head { border-color: rgba(255,255,255,0.2) !important; }

/* End of File */