/* Земельный Практикум — созвоны: отмена преподавателем и устранение дублей v1.0 */

body[data-active="calls"] .calls-reminders-duplicate-hidden {
  display: none !important;
}

body[data-active="calls"] .calls-main-duplicate-hidden {
  display: none !important;
}

.calls-dedup-empty {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 24px;
  border: 1px dashed var(--line, rgba(110, 135, 118, .28));
  border-radius: 16px;
  color: var(--muted, #6d776f);
  text-align: center;
}

.zg-call-cancel-btn {
  border-color: rgba(226, 88, 88, .42) !important;
  background: rgba(126, 34, 34, .12) !important;
  color: #dc6666 !important;
}

.zg-call-cancel-btn:hover,
.zg-call-cancel-btn:focus-visible {
  border-color: rgba(239, 95, 95, .7) !important;
  background: rgba(145, 38, 38, .2) !important;
  color: #f08080 !important;
}

.zg-call-cancelled-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid rgba(220, 95, 95, .34);
  border-radius: var(--radius, 18px);
  background: linear-gradient(135deg, rgba(135, 40, 40, .12), rgba(108, 52, 35, .06));
  box-shadow: 0 12px 30px rgba(73, 24, 24, .08);
}

.zg-call-cancelled-notice-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(214, 70, 70, .14);
  color: #d95f5f;
  font-size: 22px;
  font-weight: 900;
}

.zg-call-cancelled-notice h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.zg-call-cancelled-notice p {
  margin: 3px 0 0;
  color: var(--muted, #6d776f);
  line-height: 1.45;
}

.zg-call-cancelled-notice .zg-call-cancel-reason {
  color: #bd5050;
  font-weight: 750;
}

.zg-call-row-cancel-reason {
  grid-column: 2 / -1;
  margin-top: 5px;
  color: #c55d5d;
  font-size: 13px;
  line-height: 1.4;
}

.zg-cancel-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 12, 10, .66);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.zg-cancel-modal {
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid var(--line, rgba(110, 135, 118, .3));
  border-radius: 22px;
  background: var(--card, #fff);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .28);
}

.zg-cancel-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.zg-cancel-modal h2 {
  margin: 0;
  font-size: 25px;
}

.zg-cancel-modal-head p,
.zg-cancel-modal-summary,
.zg-cancel-modal-help {
  color: var(--muted, #6d776f);
}

.zg-cancel-modal-summary {
  margin: 18px 0;
  padding: 13px 15px;
  border-radius: 13px;
  background: rgba(110, 135, 118, .08);
}

.zg-cancel-modal label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.zg-cancel-modal textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  box-sizing: border-box;
}

.zg-cancel-modal-error {
  min-height: 20px;
  margin: 7px 0 0;
  color: #d55353;
  font-size: 13px;
  font-weight: 700;
}

.zg-cancel-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

body[data-theme="dark"] .zg-call-cancelled-notice {
  border-color: rgba(235, 105, 105, .28);
  background: linear-gradient(135deg, rgba(110, 28, 28, .22), rgba(88, 42, 28, .10));
}

body[data-theme="dark"] .zg-cancel-modal {
  background: #14211b;
  border-color: rgba(172, 201, 179, .18);
}

@media (max-width: 720px) {
  .zg-call-cancelled-notice {
    grid-template-columns: 1fr;
  }

  .zg-cancel-modal-actions {
    flex-direction: column-reverse;
  }

  .zg-cancel-modal-actions .btn {
    width: 100%;
  }
}

/* v3.0 — отмена созвона внутри основной плашки «Главное сейчас» */
body[data-role="student"][data-active="home"]
.event-hero.zg-home-call-cancelled-hero {
  position: relative;
  display: block !important;
  min-height: 270px;
  overflow: hidden;
  border-color: rgba(239, 105, 105, .38) !important;
  background-color: #170d0d !important;
  box-shadow:
    0 20px 48px rgba(56, 10, 10, .18),
    inset 0 1px 0 rgba(255, 255, 255, .04) !important;
}

body[data-role="student"][data-active="home"]
.event-hero.zg-home-call-cancelled-hero::before {
  background:
    linear-gradient(90deg, rgba(31, 9, 9, .97) 0%, rgba(36, 12, 12, .88) 52%, rgba(43, 17, 12, .44) 100%),
    radial-gradient(circle at 22% 28%, rgba(239, 91, 91, .15), transparent 34%) !important;
}

body[data-role="student"][data-active="home"]
.event-hero.zg-home-call-cancelled-hero::after {
  opacity: .38 !important;
  filter: hue-rotate(125deg) saturate(.72);
}

body[data-role="student"][data-active="home"]
.event-hero.zg-home-call-cancelled-hero > :not(.zg-home-cancelled-hero-content) {
  display: none !important;
}

.zg-home-cancelled-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 920px;
}

.zg-home-cancelled-hero-content .smart-hero-eyebrow {
  display: block;
  margin: 0 0 8px;
  color: rgba(255, 235, 235, .72);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.zg-home-cancelled-hero-content .hero-label {
  border-color: rgba(255, 150, 150, .28) !important;
  background: linear-gradient(135deg, rgba(181, 56, 56, .96), rgba(133, 37, 37, .94)) !important;
  color: #fff4f4 !important;
  box-shadow: 0 0 18px rgba(239, 91, 91, .13) !important;
}

.zg-home-cancelled-hero-content h2 {
  max-width: 920px;
  margin: 14px 0 10px;
  color: #fff !important;
  font-size: clamp(30px, 3vw, 47px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.zg-home-cancelled-meta,
.zg-home-cancelled-description,
.zg-home-cancelled-reason {
  margin: 8px 0 0;
  color: rgba(255, 240, 240, .82) !important;
  line-height: 1.5;
}

.zg-home-cancelled-meta {
  font-size: 14px;
}

.zg-home-cancelled-reason {
  color: #ffb1b1 !important;
  font-size: 16px;
}

.zg-home-cancelled-hero-content .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.zg-home-cancelled-hero-content .btn {
  min-height: 46px;
  border-color: rgba(255, 216, 216, .28) !important;
  background: rgba(48, 13, 13, .66) !important;
  color: #fff !important;
}

.zg-home-cancelled-hero-content .btn:hover,
.zg-home-cancelled-hero-content .btn:focus-visible {
  border-color: rgba(255, 154, 154, .52) !important;
  background: rgba(91, 28, 28, .72) !important;
}

@media (max-width: 720px) {
  body[data-role="student"][data-active="home"]
  .event-hero.zg-home-call-cancelled-hero {
    min-height: 0;
  }

  .zg-home-cancelled-hero-content .btn {
    width: 100%;
  }
}

/* v4.0 — обязательное подтверждение отмены учеником */
.zg-call-ack-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.zg-call-ack-btn {
  border-color: rgba(255, 174, 174, .42) !important;
  background: linear-gradient(135deg, #b94141, #8f2e2e) !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(113, 27, 27, .18);
}

.zg-call-ack-btn:hover,
.zg-call-ack-btn:focus-visible {
  border-color: rgba(255, 205, 205, .7) !important;
  background: linear-gradient(135deg, #c74a4a, #9f3535) !important;
}

.zg-call-ack-btn:disabled {
  opacity: .64;
  cursor: wait;
}

.zg-call-ack-summary {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(117, 190, 129, .22);
  border-radius: 11px;
  background: rgba(52, 139, 70, .08);
  color: #55a968;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.zg-home-cancelled-hero-content .zg-call-ack-btn {
  border-color: rgba(255, 175, 175, .5) !important;
  background: linear-gradient(135deg, #c44747, #922e2e) !important;
}

/* v5.0 — спокойное подтверждение без полного перерендера страницы */
.zg-home-cancelled-hero-content {
  transition: opacity .16s ease, transform .16s ease;
  will-change: opacity, transform;
}

body[data-role="student"][data-active="home"]
.event-hero.zg-home-call-cancelled-hero--leaving
.zg-home-cancelled-hero-content {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.zg-call-cancelled-notice {
  box-sizing: border-box;
  transition:
    opacity .16s ease,
    transform .16s ease,
    height .22s ease,
    padding .22s ease,
    border-width .22s ease,
    margin .22s ease;
}

.zg-call-cancelled-notice.zg-call-cancelled-notice--leaving {
  height: 0 !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .zg-home-cancelled-hero-content,
  .zg-call-cancelled-notice {
    transition: none !important;
  }
}

/* v7.0 — подтверждение без анимации схлопывания и без scroll anchoring */
body[data-role="student"][data-active="home"] .event-hero.zg-home-call-cancelled-hero,
body[data-role="student"][data-active="home"] .event-hero[data-zg-ack-transition="1"] {
  overflow-anchor: none;
}

.zg-home-cancelled-hero-content,
.zg-call-cancelled-notice {
  transition: none !important;
  animation: none !important;
}
