/* ==========================================
   IBS WebMCP Gateway - Common Cart Popup
========================================== */

.ibs-webmcp-confirm {
  width: min(460px, calc(100vw - 32px));
  height: min(420px, calc(100vh - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  padding: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
  font-family: inherit;
  box-sizing: border-box;
  overflow: hidden;
}

.ibs-webmcp-confirm::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

.ibs-webmcp-confirm-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 16px;
}

.ibs-webmcp-confirm h2 {
  margin: 0;
  color: #111827;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
}

.ibs-webmcp-confirm-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.ibs-webmcp-confirm-body p {
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.ibs-webmcp-confirm-details {
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.ibs-webmcp-confirm-details p:last-child {
  margin-bottom: 0;
}

.ibs-webmcp-confirm-warning {
  color: #b42318 !important;
  font-size: 13px !important;
}

.ibs-webmcp-confirm-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #eef0f3;
}

.ibs-webmcp-confirm-actions button {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.ibs-webmcp-confirm-actions button:hover {
  background: #f3f4f6;
}

.ibs-webmcp-confirm-actions .ibs-webmcp-confirm-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.ibs-webmcp-confirm-actions .ibs-webmcp-confirm-primary:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.ibs-webmcp-confirm-actions .ibs-webmcp-confirm-danger {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.ibs-webmcp-confirm-actions .ibs-webmcp-confirm-danger:hover {
  border-color: #b91c1c;
  background: #b91c1c;
}

.ibs-webmcp-confirm button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .ibs-webmcp-confirm {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    height: min(420px, calc(100dvh - 24px));
    max-height: calc(100dvh - 24px);
    padding: 22px;
    border-radius: 13px;
  }

  .ibs-webmcp-confirm h2 {
    font-size: 19px;
  }

  .ibs-webmcp-confirm-actions {
    flex-direction: column-reverse;
  }

  .ibs-webmcp-confirm-actions button {
    width: 100%;
  }
}
