body.k2-contestation-open {
  overflow: hidden;
}

.k2-contestation-overlay,
.k2-contestation-overlay * {
  box-sizing: border-box;
}

.k2-contestation-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  background: radial-gradient(circle at 50% 12%, rgba(37, 200, 255, 0.13), transparent 34%), rgba(2, 6, 16, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: "Inter", "Poppins", sans-serif;
}

.k2-contestation-overlay.hidden {
  display: none;
}

.k2-contestation-dialog {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100dvh - 32px);
  padding: 26px;
  overflow-y: auto;
  color: #eaf6ff;
  background: linear-gradient(180deg, #151f33 0%, #0a1220 100%);
  border: 1px solid rgba(79, 195, 247, 0.36);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), 0 0 32px rgba(0, 191, 255, 0.08);
}

.k2-contestation-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #a9bbcc;
  background: rgba(4, 11, 23, 0.65);
  border: 1px solid rgba(143, 163, 184, 0.2);
  border-radius: 10px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.k2-contestation-heading {
  padding-right: 46px;
}

.k2-contestation-heading > span,
.k2-contestation-reason strong {
  color: #7dd3fc;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.k2-contestation-heading h2 {
  margin: 6px 0 5px;
  color: #fff;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  line-height: 1.2;
}

.k2-contestation-heading p,
.k2-contestation-reason p,
.k2-contestation-permanent,
.k2-contestation-chat-heading p,
.k2-contestation-disclaimer {
  margin: 0;
  color: #b9cadb;
  line-height: 1.5;
}

.k2-contestation-reason {
  margin: 18px 0;
  padding: 14px 16px;
  background: rgba(3, 9, 18, 0.48);
  border: 1px solid rgba(143, 163, 184, 0.17);
  border-radius: 12px;
}

.k2-contestation-reason p {
  margin-top: 6px;
  color: #edf8ff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.k2-contestation-permanent {
  padding: 14px 16px;
  color: #fed7aa;
  background: rgba(124, 45, 18, 0.22);
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-radius: 12px;
}

.k2-contestation-chat {
  overflow: hidden;
  border: 1px solid rgba(79, 195, 247, 0.24);
  border-radius: 14px;
  background: rgba(3, 9, 18, 0.5);
}

.k2-contestation-chat-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(143, 163, 184, 0.14);
}

.k2-contestation-chat-heading h3 {
  margin: 0 0 3px;
  color: #fff;
  font-size: 1rem;
}

.k2-contestation-chat-heading p {
  font-size: 0.82rem;
}

.k2-contestation-chat-heading > span {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #86efac;
  font-size: 0.73rem;
  font-weight: 700;
}

.k2-contestation-chat-heading i,
.k2-contestation-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.k2-contestation-messages {
  height: min(32vh, 280px);
  min-height: 180px;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.k2-contestation-message {
  display: flex;
}

.k2-contestation-message.is-user {
  justify-content: flex-end;
}

.k2-contestation-message > div {
  max-width: 86%;
  padding: 10px 12px;
  color: #dcecf8;
  background: #18283c;
  border-radius: 5px 12px 12px 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.k2-contestation-message.is-user > div {
  color: #041019;
  background: linear-gradient(145deg, #79dcff, #31bde9);
  border-radius: 12px 5px 12px 12px;
}

.k2-contestation-status {
  align-items: center;
  gap: 7px;
  padding: 0 16px 10px;
  color: #91a8bc;
  font-size: 0.76rem;
}

.k2-contestation-status:not([hidden]) {
  display: flex;
}

.k2-contestation-status i {
  background: #38bdf8;
  animation: k2-contestation-pulse 1s ease-in-out infinite alternate;
}

.k2-contestation-form {
  padding: 12px 14px 10px;
  background: rgba(10, 20, 34, 0.92);
  border-top: 1px solid rgba(143, 163, 184, 0.14);
}

.k2-contestation-form label,
.k2-contestation-form textarea {
  display: block;
  width: 100%;
}

.k2-contestation-form textarea {
  min-height: 68px;
  max-height: 140px;
  resize: vertical;
  padding: 10px 12px;
  color: #edf8ff;
  background: #081321;
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 10px;
  font: inherit;
  line-height: 1.45;
  outline: none;
}

.k2-contestation-form textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.k2-contestation-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.k2-contestation-counter {
  color: #7890a5;
}

.k2-contestation-form button,
.k2-contestation-login-again {
  min-height: 40px;
  padding: 8px 18px;
  color: #041019;
  background: linear-gradient(145deg, #79dcff, #31bde9);
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.k2-contestation-form button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.k2-contestation-disclaimer {
  padding: 0 14px 12px;
  color: #71879b;
  font-size: 0.7rem;
  text-align: center;
}

.k2-contestation-login-again {
  width: 100%;
  margin-top: 14px;
}

@keyframes k2-contestation-pulse {
  to { opacity: 0.35; }
}

@media (max-width: 560px) {
  .k2-contestation-overlay {
    padding: 0;
  }

  .k2-contestation-dialog {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: 20px 14px;
    border: 0;
    border-radius: 0;
  }

  .k2-contestation-chat-heading {
    padding-right: 12px;
  }

  .k2-contestation-chat-heading > span {
    display: none;
  }

  .k2-contestation-messages {
    height: 30vh;
  }
}
