/* ═══════════════════════════════════════════════════════════════════════════
   iride_confirm.css — Popup di conferma universale animato (intera piattaforma)
   Compatibile con Gestionale v3, Portale Clienti, Collaboratori, Silvercom/App
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes irCfBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes irCfCardIn {
  0%   { opacity: 0; transform: translateY(20px) scale(0.90); }
  65%  { opacity: 1; transform: translateY(-3px) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes irCfCardOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(10px) scale(0.95); }
}
@keyframes irCfCardYes {
  0%   { opacity: 1; transform: scale(1); }
  45%  { opacity: 1; transform: scale(1.03); }
  100% { opacity: 0; transform: translateY(-8px) scale(0.97); }
}
@keyframes irCfHalo {
  0%   { transform: scale(0.82); opacity: 0.72; }
  100% { transform: scale(1.68); opacity: 0; }
}
@keyframes irCfStroke {
  to   { stroke-dashoffset: 0; }
}
@keyframes irCfDangerWobble {
  0%, 100% { transform: rotate(0deg); }
  22%      { transform: rotate(-10deg) scale(1.06); }
  48%      { transform: rotate(9deg) scale(1.06); }
  74%      { transform: rotate(-4deg); }
}
@keyframes irCfFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}
@keyframes irCfSheen {
  0%   { transform: translateX(-140%) skewX(-18deg); }
  100% { transform: translateX(260%) skewX(-18deg); }
}

.ir-cf-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 8, 15, 0.62);
  backdrop-filter: blur(11px) saturate(135%);
  -webkit-backdrop-filter: blur(11px) saturate(135%);
  animation: irCfBackdropIn 0.18s ease-out forwards;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif);
  box-sizing: border-box;
}
.ir-cf-overlay *, .ir-cf-overlay *::before, .ir-cf-overlay *::after {
  box-sizing: border-box;
}
.ir-cf-overlay.is-closing {
  opacity: 0;
  transition: opacity 0.17s ease-in;
  pointer-events: none;
}

.ir-cf-card {
  --cf-accent: var(--gold, #c2a14e);
  --cf-accent-soft: var(--gold-soft, #f5df9d);
  --cf-glow: rgba(194, 161, 78, 0.28);
  position: relative;
  width: 100%;
  max-width: 448px;
  border-radius: 22px;
  padding: 24px 24px 20px;
  background: linear-gradient(165deg, rgba(22, 26, 40, 0.97) 0%, rgba(12, 15, 24, 0.99) 100%);
  border: 1px solid color-mix(in srgb, var(--cf-accent) 42%, rgba(255, 255, 255, 0.09));
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.68),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 18px 46px -18px var(--cf-glow);
  color: #f4f6fb;
  text-align: left;
  overflow: hidden;
  animation: irCfCardIn 0.32s cubic-bezier(0.18, 1.22, 0.32, 1) forwards;
}
.ir-cf-card.is-cancel-out {
  animation: irCfCardOut 0.16s ease-in forwards;
}
.ir-cf-card.is-confirm-out {
  animation: irCfCardYes 0.21s ease-out forwards;
}

.ir-cf-card[data-kind="success"] {
  --cf-accent: #10b981;
  --cf-accent-soft: #6ee7b7;
  --cf-glow: rgba(16, 185, 129, 0.28);
}
.ir-cf-card[data-kind="danger"] {
  --cf-accent: #f43f5e;
  --cf-accent-soft: #fda4af;
  --cf-glow: rgba(244, 63, 94, 0.29);
}
.ir-cf-card[data-kind="warning"] {
  --cf-accent: #f59e0b;
  --cf-accent-soft: #fcd34d;
  --cf-glow: rgba(245, 158, 11, 0.26);
}
.ir-cf-card[data-kind="send"] {
  --cf-accent: var(--gold, #c2a14e);
  --cf-accent-soft: var(--gold-soft, #f5df9d);
  --cf-glow: rgba(194, 161, 78, 0.28);
}

.ir-cf-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cf-accent-soft), transparent);
  opacity: 0.8;
}
.ir-cf-card::after {
  content: "";
  position: absolute;
  top: -65px; left: -45px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cf-glow) 0%, transparent 70%);
  pointer-events: none;
}

.ir-cf-top {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  position: relative;
  z-index: 1;
}

.ir-cf-icon-wrap {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--cf-accent) 16%, rgba(255, 255, 255, 0.03));
  border: 1px solid color-mix(in srgb, var(--cf-accent) 44%, transparent);
  color: var(--cf-accent-soft);
  box-shadow: 0 8px 22px -6px var(--cf-glow);
}
.ir-cf-icon-wrap::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 17px;
  border: 1.5px solid var(--cf-accent);
  opacity: 0;
  animation: irCfHalo 1.35s cubic-bezier(0.16, 1, 0.3, 1) 0.08s 2;
  pointer-events: none;
}
.ir-cf-icon-wrap svg {
  width: 23px;
  height: 23px;
}
.ir-cf-icon-wrap svg .ir-cf-draw {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: irCfStroke 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}
.ir-cf-card[data-kind="danger"] .ir-cf-icon-wrap svg {
  animation: irCfDangerWobble 0.48s ease 0.1s;
}
.ir-cf-card[data-kind="send"] .ir-cf-icon-wrap svg {
  animation: irCfFloat 2.2s ease-in-out infinite;
}

.ir-cf-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cf-accent-soft);
  opacity: 0.9;
  margin-bottom: 4px;
}
.ir-cf-title {
  font-family: var(--font-display, -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, sans-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.28;
  color: #ffffff;
  letter-spacing: -0.015em;
  margin: 0;
}
.ir-cf-ctx {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ir-cf-card--interactive {
  max-width: 500px;
}
.ir-cf-msg {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.54;
  color: rgba(226, 232, 240, 0.86);
  white-space: normal;
}
.ir-cf-msg--plain {
  white-space: pre-line;
}
.ir-cf-msg b, .ir-cf-msg strong {
  color: #ffffff;
  font-weight: 650;
}
.ir-cf-msg .v3u-66faf1 {
  color: rgba(148, 163, 184, 0.88);
  font-size: 12px;
}
.ir-cf-msg .v3u-c-gold_fs-12px {
  color: var(--cf-accent-soft, #f5df9d);
  font-size: 12px;
}
.ir-cf-msg label {
  border-radius: 8px;
  padding: 4px 6px;
  transition: background 0.14s ease;
}
.ir-cf-msg label:hover {
  background: rgba(255, 255, 255, 0.055);
}
.ir-cf-msg input[type="checkbox"], .ir-cf-msg input[type="radio"] {
  accent-color: var(--cf-accent);
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  cursor: pointer;
}

.ir-cf-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  position: relative;
  z-index: 1;
}
.ir-cf-hint {
  margin-right: auto;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.62);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
@media (max-width: 480px) {
  .ir-cf-hint { display: none; }
}

.ir-cf-btn-no {
  padding: 8px 15px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.ir-cf-btn-no:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}
.ir-cf-btn-yes {
  position: relative;
  overflow: hidden;
  padding: 8px 18px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid color-mix(in srgb, var(--cf-accent) 65%, rgba(255, 255, 255, 0.22));
  background: linear-gradient(135deg, color-mix(in srgb, var(--cf-accent) 92%, #ffffff), color-mix(in srgb, var(--cf-accent) 72%, #000000));
  color: #0b0f17;
  box-shadow: 0 8px 22px -5px var(--cf-glow);
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.15s, filter 0.15s;
}
.ir-cf-card[data-kind="danger"] .ir-cf-btn-yes {
  color: #ffffff;
}
.ir-cf-btn-yes:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
  box-shadow: 0 12px 28px -4px var(--cf-glow);
}
.ir-cf-btn-yes:active {
  transform: scale(0.97);
}
.ir-cf-btn-yes::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: translateX(-140%);
  animation: irCfSheen 2.8s ease-in-out 0.35s infinite;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .ir-cf-card, .ir-cf-overlay, .ir-cf-icon-wrap::after, .ir-cf-icon-wrap svg, .ir-cf-btn-yes::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
