/* =========================================================
   MIRIDEA · Калькулятор стоимости сайта (/calculator/)
   Работает поверх dorabotka.css (переменные .m-dr). Анимации — transform/opacity.
   ========================================================= */
.m-cc-ill { position: relative; }
.m-cc-ill svg { display: block; width: 100%; height: auto; overflow: visible; }
.m-cc-ill .f1 { animation: m-cc-float 6s ease-in-out infinite; }
.m-cc-ill .f2 { animation: m-cc-float 7s ease-in-out -2s infinite; }
.m-cc-ill .f3 { animation: m-cc-float 5.5s ease-in-out -1s infinite; }
@keyframes m-cc-float { 50% { transform: translateY(-10px); } }
.m-cc-ill .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: m-cc-bar 3.2s cubic-bezier(.22,1,.36,1) infinite alternate; }
.m-cc-ill .bar:nth-of-type(2) { animation-delay: -.8s; } .m-cc-ill .bar:nth-of-type(3) { animation-delay: -1.6s; } .m-cc-ill .bar:nth-of-type(4) { animation-delay: -2.4s; }
@keyframes m-cc-bar { from { transform: scaleY(.55); } to { transform: scaleY(1); } }

/* Пресеты: с чего начать */
.m-cc-presets { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin-bottom: 40px; }
@media (max-width: 1100px) { .m-cc-presets { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 600px) { .m-cc-presets { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.m-cc-preset { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 16px 14px; border: 0; border-radius: 10px 22px 10px 22px; background: #fff;
  box-shadow: 0 0 0 1px var(--line); text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  transition: translate .4s cubic-bezier(.22,1,.36,1), box-shadow .3s, background .3s; }
.m-cc-preset:hover { translate: 0 -4px; box-shadow: 0 20px 40px -26px rgba(63,85,195,.6), 0 0 0 1px #cfd6e6; }
.m-cc-preset b { font-size: 16px; font-weight: 700; }
.m-cc-preset span { font-size: 13px; line-height: 1.35; color: var(--mute); }
.m-cc-preset em { margin-top: 6px; font-style: normal; font-size: 14px; font-weight: 700; color: var(--red); }
.m-cc-preset.is-on { background: linear-gradient(140deg,#a068f8 0%,#3f55c3 55%,#184eae 100%); box-shadow: 0 22px 44px -26px rgba(63,85,195,.9); }
.m-cc-preset.is-on b, .m-cc-preset.is-on span, .m-cc-preset.is-on em { color: #fff; }

/* Раскладка: группы + липкая смета */
.m-cc-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 32px; align-items: start; }
@media (max-width: 1100px) { .m-cc-layout { grid-template-columns: 1fr; } }
.m-cc-group { margin-bottom: 36px; }
.m-cc-group__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.m-cc-group__head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  background: linear-gradient(169deg,var(--red),var(--pink)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.m-cc-group__sum { font-size: 13px; color: var(--mute); }
.m-cc-group__sum b { color: var(--ink); }
.m-cc-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.m-cc-chip { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px 8px 16px; border: 0; border-radius: 8px 16px 8px 16px; background: #fff;
  box-shadow: 0 0 0 1px var(--line); font: inherit; text-align: left; cursor: pointer; color: var(--ink);
  transition: background .25s, box-shadow .25s, translate .3s cubic-bezier(.22,1,.36,1); -webkit-tap-highlight-color: transparent; }
.m-cc-chip:hover { box-shadow: 0 0 0 1px #c3cbe0, 0 12px 26px -20px rgba(63,85,195,.7); translate: 0 -2px; }
.m-cc-chip:focus-visible { outline: 2px solid #3f55c3; outline-offset: 2px; }
.m-cc-chip__name { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.m-cc-chip__price { font-size: 12.5px; font-weight: 600; color: var(--mute); white-space: nowrap; }
.m-cc-chip__box { flex: none; position: relative; width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px #c5ccdb; transition: background .25s, box-shadow .25s; }
.m-cc-chip__box::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.m-cc-chip.is-on { background: linear-gradient(140deg,#a068f8 0%,#3f55c3 60%,#184eae 100%); box-shadow: 0 14px 28px -18px rgba(63,85,195,.95); }
.m-cc-chip.is-on .m-cc-chip__name, .m-cc-chip.is-on .m-cc-chip__price { color: #fff; }
.m-cc-chip.is-on .m-cc-chip__box { background: rgba(255,255,255,.22); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); }
.m-cc-chip.is-on .m-cc-chip__box::after { transform: rotate(45deg) scale(1); }
.m-cc-chip.is-pop { animation: m-cc-pop .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes m-cc-pop { 50% { transform: scale(1.05); } }
.m-cc-q { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #eef1f7; color: var(--mute); font-size: 12px; font-weight: 700; line-height: 1; transition: background .25s, color .25s; }
.m-cc-q:hover { background: var(--red); color: #fff; }
.m-cc-chip.is-on .m-cc-q { background: rgba(255,255,255,.22); color: #fff; }
.m-cc-chip--free .m-cc-chip__price { color: #1f9a52; }
.m-cc-chip--free.is-on .m-cc-chip__price { color: #fff; }

/* Подсказка */
.m-cc-tip { position: fixed; z-index: 60; max-width: 280px; padding: 12px 14px; border-radius: 8px 16px 8px 16px; background: #2b303a; color: #fff; font-size: 13.5px; line-height: 1.5;
  box-shadow: 0 18px 40px -16px rgba(20,24,36,.6); pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .25s; }
.m-cc-tip.is-on { opacity: 1; transform: none; }

/* Смета */
.m-cc-sum { position: sticky; top: 100px; padding: 24px; border-radius: 12px 28px 12px 28px; background: #fff; box-shadow: 0 34px 80px -50px rgba(24,78,174,.55), 0 0 0 1px var(--line); }
.m-cc-sum__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.m-cc-sum__head h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .03em; }
.m-cc-sum__head h2 i { margin-left: 6px; padding: 2px 8px; border-radius: 10px; background: #fff0f2; color: var(--red); font-style: normal; font-size: 13px; }
.m-cc-reset { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--mute); cursor: pointer; border-bottom: 1px dashed currentColor; }
.m-cc-reset:hover { color: var(--red); }
.m-cc-list { max-height: 330px; overflow: auto; margin: 0 -8px 16px; padding: 0 8px; list-style: none; overscroll-behavior: contain; }
.m-cc-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #eef1f6; font-size: 14px; color: var(--ink); animation: m-cc-in .35s cubic-bezier(.22,1,.36,1); }
.m-cc-list li span { flex: 1; min-width: 0; }
.m-cc-list li b { font-weight: 600; white-space: nowrap; color: var(--mute); font-size: 13px; }
.m-cc-list li button { flex: none; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: #b3bccd; font-size: 18px; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.m-cc-list li button:hover { background: #fff0f2; color: var(--red); }
@keyframes m-cc-in { from { opacity: 0; transform: translateX(10px); } }
.m-cc-empty { margin: 0 0 16px; padding: 16px; border-radius: 8px 16px 8px 16px; background: var(--soft); font-size: 14px; line-height: 1.5; color: var(--mute); }
.m-cc-total { padding-top: 4px; }
.m-cc-total p { margin: 0; font-size: 13px; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.m-cc-total strong { display: block; margin: 4px 0 2px; font-size: 34px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums;
  background: linear-gradient(169deg,var(--red),var(--pink)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.m-cc-term { margin: 0 0 14px !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 14px !important; }
.m-cc-term b { color: var(--ink); }
.m-cc-sum .btn { width: 100%; justify-content: center; }
.m-cc-sum__links { display: grid; gap: 8px; margin-top: 14px; font-size: 14px; }
.m-cc-sum__links a, .m-cc-sum__links button { justify-self: start; }
.m-cc-copy { border: 0; background: none; padding: 0; font: inherit; color: var(--mute); cursor: pointer; border-bottom: 1px dashed currentColor; }
.m-cc-copy:hover { color: var(--red); }
.m-cc-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--mute); }
.m-cc-brief { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: 8px 16px 8px 16px; background: var(--soft); text-decoration: none; color: var(--ink) !important; transition: background .3s, translate .3s; }
.m-cc-brief:hover { background: #fff0f2; translate: 0 -2px; }
.m-cc-brief svg { flex: none; width: 34px; height: 34px; }
.m-cc-brief span { font-size: 13px; line-height: 1.4; color: var(--mute); }
.m-cc-brief b { display: block; font-size: 15px; color: var(--ink); }

/* Мобильная плашка с итогом */
.m-cc-float { position: fixed; z-index: 40; left: 12px; bottom: 14px; display: none; align-items: center; gap: 10px; padding: 10px 16px; border: 0; border-radius: 10px 20px 10px 20px;
  background: linear-gradient(140deg,#a068f8 0%,#3f55c3 60%,#184eae 100%); color: #fff; font: inherit; box-shadow: 0 16px 34px -14px rgba(24,78,174,.9); cursor: pointer;
  transition: opacity .3s, transform .4s cubic-bezier(.22,1,.36,1); }
.m-cc-float b { font-size: 17px; font-variant-numeric: tabular-nums; }
.m-cc-float span { font-size: 12px; opacity: .85; }
.m-cc-float.is-hide { opacity: 0; transform: translateY(30px); pointer-events: none; }
@media (max-width: 1100px) { .m-cc-float { display: flex; } .m-cc-sum { position: static; } }

/* Блок «как считаем» */
.m-cc-how { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
@media (max-width: 900px) { .m-cc-how { grid-template-columns: 1fr; } }
.m-cc-how > div { padding: 24px; border-radius: 10px 22px 10px 22px; background: var(--soft); }
.m-cc-how b { display: block; margin-bottom: 8px; font-size: 17px; color: var(--ink); }
.m-cc-how p { margin: 0; font-size: 15px; line-height: 1.6; color: #5d6578; }
@media (prefers-reduced-motion: reduce) { .m-cc-ill *, .m-cc-chip, .m-cc-list li { animation: none !important; } }
.m-cc-list { max-height: max(160px, calc(100vh - 500px)); }
@media (max-width: 1100px) { .m-cc-list { max-height: none; } }
@media (max-width: 600px) {
  .m-cc-chips { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .m-cc-chip { width: 100%; min-height: 46px; }
  .m-cc-chip__name { flex: 1; font-size: 14px; }
  .m-cc-group__head h2 { font-size: 18px; }
}
