/* =====================================================================
 *  بلوک «خلاصه‌ی رادار» - استایل مشترک فرانت و ادیتور
 * ===================================================================== */
.cr-radar-box {
    position: relative;
    border-radius: 18px;
    padding: 22px 24px 20px;
    overflow: hidden;
    margin: 24px 0;
}

/* --- نسخه‌ی تیره --- */
.cr-radar-box--dark {
    background: radial-gradient(ellipse at 30% 0%, #26261f, #14140f 65%);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

/* --- نسخه‌ی روشن --- */
.cr-radar-box--light {
    background: #fffdf7;
    border: 1px solid #ecebe1;
    box-shadow: 0 3px 14px rgba(20, 18, 10, .05);
}

.cr-radar-rings {
    position: absolute;
    inset-inline-end: -30px;
    top: -30px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    opacity: .5;
}
.cr-radar-rings::before,
.cr-radar-rings::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, .22);
}
.cr-radar-rings::after { inset: 22px; border-color: rgba(212, 175, 55, .35); }
.cr-radar-box--light .cr-radar-rings::before { border-color: rgba(169, 134, 31, .18); }
.cr-radar-box--light .cr-radar-rings::after { border-color: rgba(169, 134, 31, .28); }

.cr-radar-sweep {
    position: absolute;
    inset-inline-end: -30px;
    top: -30px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(240, 210, 118, .55), transparent 55deg, transparent 360deg);
    animation: crRadarSpin 4s linear infinite;
    -webkit-mask: radial-gradient(circle, transparent 40%, #000 41%);
    mask: radial-gradient(circle, transparent 40%, #000 41%);
}
.cr-radar-box--light .cr-radar-sweep {
    background: conic-gradient(from 0deg, rgba(169, 134, 31, .28), transparent 55deg, transparent 360deg);
}
/* --- حالت «بدون انیمیشن» (از پنل بلوک قابل غیرفعال‌شدنه) --- */
.cr-radar-static .cr-radar-sweep { animation: none; }
.cr-radar-static .cr-radar-ping i::after { animation: none; opacity: 0; }

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

.cr-radar-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.cr-radar-head-title { display: flex; align-items: center; gap: 10px; }

.cr-radar-ping { position: relative; width: 11px; height: 11px; flex: 0 0 11px; }
.cr-radar-ping i { position: absolute; inset: 0; border-radius: 50%; background: #f0d276; }
.cr-radar-ping i::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid #f0d276;
    animation: crRadarPing 1.8s ease-out infinite;
}
@keyframes crRadarPing { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }

.cr-radar-head h3 { margin: 0; color: #fff; font-size: 14.5px; font-weight: 800; }
.cr-radar-box--light .cr-radar-head h3 { color: #17181a; }
.cr-radar-sub { display: block; margin-top: 2px; font-size: 10px; color: #9a9c8f; font-weight: 400; }
.cr-radar-box--light .cr-radar-sub { color: #8a8c93; }

.cr-radar-freq {
    font-family: "Courier New", monospace;
    font-size: 9.5px;
    color: #f0d276;
    border: 1px solid rgba(212, 175, 55, .35);
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: .5px;
    white-space: nowrap;
}
.cr-radar-box--light .cr-radar-freq { color: #a9861f; border-color: rgba(169, 134, 31, .3); }

.cr-radar-signal-list { position: relative; z-index: 1; list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; }
.cr-radar-signal-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-top: 1px dashed rgba(255, 255, 255, .08); }
.cr-radar-signal-item:first-child { border-top: none; }
.cr-radar-box--light .cr-radar-signal-item { border-top-color: #efeee6; }

.cr-radar-signal-tag {
    flex: 0 0 auto;
    font-family: "Courier New", monospace;
    font-size: 9.5px;
    color: #f0d276;
    background: rgba(212, 175, 55, .1);
    border: 1px solid rgba(212, 175, 55, .25);
    border-radius: 5px;
    padding: 2px 6px;
    margin-top: 2px;
    letter-spacing: .5px;
    white-space: nowrap;
}
.cr-radar-box--light .cr-radar-signal-tag { color: #a9861f; background: rgba(169, 134, 31, .08); border-color: rgba(169, 134, 31, .22); }

.cr-radar-signal-item p { margin: 0; font-size: 13px; line-height: 1.9; color: #e7e5df; }
.cr-radar-box--light .cr-radar-signal-item p { color: #26272b; }

.cr-radar-foot {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 10px;
    color: #84868c;
}
.cr-radar-box--light .cr-radar-foot { border-top-color: #efeee6; color: #9b9ca2; }
.cr-radar-live { display: flex; align-items: center; gap: 5px; color: #8fd19e; }
.cr-radar-live b { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; display: inline-block; box-shadow: 0 0 6px #4ade80; }

/* --- کنترل‌های ادیتور (فقط داخل بلاک‌ادیتور دیده می‌شن) --- */
.cr-radar-editor-item-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 8px; }
.cr-radar-editor-item-row textarea {
    flex: 1;
    min-height: 44px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.8;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .04);
    color: inherit;
    resize: vertical;
}
.cr-radar-box--light .cr-radar-editor-item-row textarea { border-color: #e5e1d3; background: #fff; color: #26272b; }
.cr-radar-editor-item-btns { display: flex; flex-direction: column; gap: 3px; }
.cr-radar-editor-item-btns button {
    border: none; background: rgba(255,255,255,.1); color: inherit; width: 24px; height: 22px;
    border-radius: 5px; cursor: pointer; font-size: 11px; line-height: 1;
}
.cr-radar-box--light .cr-radar-editor-item-btns button { background: #f1efe6; }
.cr-radar-editor-add-btn {
    margin-top: 4px; border: 1px dashed rgba(212,175,55,.4); background: transparent; color: #f0d276;
    padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 12px; font-family: inherit;
}
.cr-radar-box--light .cr-radar-editor-add-btn { color: #a9861f; border-color: rgba(169,134,31,.4); }
