/**
 * Modal de confirmación de compra (reemplaza SweetAlert en buyEvent)
 */

.pcm {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.pcm.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

body.pcm-open {
  overflow: hidden !important;
}

.pcm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pcm__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 54rem;
  max-height: min(92vh, 52rem);
  background: #18181b;
  border: 1px solid #2e2e32;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}

.pcm.is-open .pcm__panel {
  transform: translateY(0) scale(1);
}

.pcm__header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem 1.15rem 0.95rem;
  border-bottom: 1px solid #2e2e32;
  background: linear-gradient(180deg, rgba(246, 88, 82, 0.1) 0%, transparent 100%);
}

.pcm__header-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: rgba(246, 88, 82, 0.15);
  color: #f65852;
  font-size: 1.15rem;
}

.pcm__header-text {
  flex: 1 1 auto;
  min-width: 0;
}

.pcm__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f4f4f5;
  line-height: 1.25;
}

.pcm__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: #a1a1aa;
  line-height: 1.35;
}

.pcm__close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a1a1aa;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pcm__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f4f4f5;
}

.pcm__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1.15rem;
  -webkit-overflow-scrolling: touch;
}

.pcm__alert,
.pcm__notice {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.pcm__alert {
  margin-bottom: 0.75rem;
}

.pcm__alert--warning {
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.42);
  color: #fde68a;
}

.pcm__alert--warning i {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: #facc15;
  font-size: 1rem;
}

.pcm__alert--warning strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #fef08a;
  font-size: 0.875rem;
}

.pcm__alert--warning p {
  margin: 0;
  color: #fde68a;
}

.pcm__notice {
  flex-direction: column;
  gap: 0;
  margin-bottom: 1rem;
}

.pcm__notice--info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #bfdbfe;
}

.pcm__notice--info strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
  color: #dbeafe;
}

.pcm__notice--info p {
  margin: 0 0 0.5rem;
}

.pcm__notice--info p:last-child {
  margin-bottom: 0;
}

.pcm__notice-wsp {
  color: #e0f2fe !important;
}

.pcm__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  align-items: start;
}

.pcm__col {
  min-width: 0;
}

.pcm__evento {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  color: #f4f4f5;
  line-height: 1.35;
}

.pcm__datos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0;
}

.pcm__dato {
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: #0f0f11;
  border: 1px solid #2e2e32;
  border-radius: 10px;
}

.pcm__dato dt {
  margin: 0 0 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #71717a;
}

.pcm__dato dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f4f4f5;
  word-break: break-word;
}

.pcm__checks {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pcm__check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0.7rem 0.75rem;
  background: rgba(22, 163, 74, 0.08);
  border: 2px solid rgba(34, 197, 94, 0.45);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.08);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.pcm__check:hover {
  border-color: rgba(74, 222, 128, 0.75);
  background: rgba(22, 163, 74, 0.12);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18);
}

.pcm__check:has(input:checked) {
  border-color: #22c55e;
  background: rgba(22, 163, 74, 0.16);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25), 0 4px 14px rgba(22, 163, 74, 0.12);
}

.pcm__check input[type="checkbox"] {
  flex: 0 0 auto;
  position: static;
  width: auto;
  height: auto;
  margin: 0.2rem 0 0;
  padding: 0;
  overflow: visible;
  clip: auto;
  border: 0;
  zoom: 2;
  accent-color: #22c55e;
  cursor: pointer;
}

.pcm__check-box {
  display: none;
}

.pcm__check input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(34, 197, 94, 0.45);
  outline-offset: 2px;
}

.pcm__check input:checked + .pcm__check-box {
  border-color: #22c55e;
  background: #16a34a;
}

.pcm__check input:checked + .pcm__check-box::after {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 0.05rem;
  width: 0.35rem;
  height: 0.65rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pcm__check input:focus-visible + .pcm__check-box {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}

.pcm__check--optional {
  align-items: center;
}

.pcm__check--optional input[type="checkbox"] {
  margin: 0;
}

.pcm__check-text {
  flex: 1 1 auto;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #d4d4d8;
}

.pcm__check-text b {
  color: #f4f4f5;
  font-weight: 600;
}

.pcm__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.95rem 1.15rem 1.15rem;
  border-top: 1px solid #2e2e32;
  background: #141416;
}

.pcm__btn {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.85rem;
  margin: 0;
  padding: 0 1rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: filter 0.15s, opacity 0.15s, background 0.15s;
  border: 1px solid transparent;
}

.pcm__btn--ghost {
  background: transparent;
  border-color: #3f3f46;
  color: #d4d4d8;
}

.pcm__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #f4f4f5;
}

.pcm__btn--confirm {
  background: #16a34a;
  border-color: #22c55e;
  color: #fff;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.28);
  height: 2.75rem;
  padding: 0 0.65rem;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
}

.pcm__btn--confirm:hover:not(:disabled) {
  filter: brightness(1.06);
}

.pcm__btn--confirm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 720px) {
  .pcm__layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pcm__evento {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .pcm {
    padding: 0.5rem;
    align-items: flex-end;
  }

  .pcm__panel {
    max-height: 94vh;
    border-radius: 16px 16px 0 0;
  }

  .pcm__datos {
    grid-template-columns: 1fr;
  }

  .pcm__footer {
    flex-direction: column-reverse;
  }

  .pcm__btn {
    width: 100%;
  }
}
