.wccu-customizer {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid #d6dde8;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 0%, rgba(16, 96, 186, 0.14), transparent 45%),
    linear-gradient(155deg, #f7fbff 0%, #eef4fb 100%);
}

.wccu-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.wccu-inline-head h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #10273f;
}

.wccu-inline-note {
  margin: 0.55rem 0 0;
  color: #4a6077;
  font-size: 0.92rem;
}

.wccu-inline-summary {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: #1f3347;
}

.wccu-summary-total {
  margin-top: 0.45rem;
  font-weight: 700;
  color: #10273f;
}

.wccu-summary-item {
  display: block;
  padding: 0.35rem 0;
}

.wccu-summary-item summary {
  cursor: pointer;
  list-style: none;
}

.wccu-summary-item summary::-webkit-details-marker {
  display: none;
}

.wccu-summary-item[open] summary {
  margin-bottom: 0.25rem;
}

.wccu-item-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.2rem;
  padding-left: 0.1rem;
  font-size: 0.82rem;
  color: #4a6077;
}

.wccu-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: none;
  padding: 5vh 5vw;
  background: rgba(14, 23, 35, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 220ms ease;
}

.wccu-modal[aria-hidden="false"] {
  display: block;
  opacity: 1;
}

.wccu-modal-card {
  position: relative;
  z-index: 2147483647;
  width: 90vw;
  max-width: 90vw;
  height: 90vh;
  max-height: 90vh;
  margin: 0 auto;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid #d0d9e6;
  background: linear-gradient(160deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 22px 56px rgba(13, 28, 45, 0.22);
  padding: 1.1rem;
  transform: translateY(18px) scale(0.985);
  opacity: 0;
  transition: transform 260ms ease, opacity 260ms ease;
}

.wccu-modal[aria-hidden="false"] .wccu-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.wccu-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid #ccd6e3;
  border-radius: 999px;
  background: #fff;
  color: #143354;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.wccu-modal-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
  margin-top: 1.2rem;
  min-height: calc(90vh - 5rem);
}

.wccu-visual-panel,
.wccu-controls-panel {
  border: 1px solid #d7e0ec;
  border-radius: 12px;
  padding: 0.9rem;
  background: #ffffff;
}

.wccu-step {
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed #d8e1ee;
}

.wccu-step-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.wccu-step-pill {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem;
  align-items: center;
  border: 1px solid #d7e0ec;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.35rem 0.45rem;
}

.wccu-step-index {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  background: #e6eef8;
  color: #204468;
  font-weight: 700;
}

.wccu-step-label {
  font-size: 0.78rem;
  color: #2b4867;
}

.wccu-badge {
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid;
  transition: all 180ms ease;
}

.wccu-badge.is-pending {
  background: #fff6df;
  color: #7e5a08;
  border-color: #efddac;
}

.wccu-badge.is-done {
  background: #e8f8ec;
  color: #17673a;
  border-color: #bde5cb;
}

.wccu-step:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.wccu-step h4 {
  margin: 0 0 0.65rem;
  color: #1b3551;
}

.wccu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.7rem;
}

.wccu-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: #314b67;
}

.wccu-action-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.wccu-toggle-option {
  margin-top: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #2c4765;
  font-size: 0.84rem;
}

.wccu-toggle-option input {
  margin: 0;
}

.wccu-resize-tip {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #4a6077;
}

.wccu-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.wccu-area-btn,
.wccu-hotspot {
  border: 1px solid #9db0c7;
  border-radius: 8px;
  background: #fff;
  color: #1b3958;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.wccu-area-btn {
  padding: 0.42rem 0.62rem;
  font-size: 0.84rem;
}

.wccu-area-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(22, 54, 84, 0.12);
}

.wccu-area-btn.is-active,
.wccu-hotspot.is-active {
  border-color: #0d66c2;
  background: #0d66c2;
  color: #fff;
}

.wccu-preview {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #d4deea;
  background: #f5f8fc;
  min-height: 320px;
}

.wccu-preview > img {
  display: block;
  width: 100%;
  height: auto;
}

.wccu-preview-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.wccu-preview-node {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(17, 40, 66, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(1px);
  animation: wccuFadeIn 220ms ease;
  pointer-events: auto;
  cursor: grab;
  transition: transform 120ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.wccu-preview-node:hover {
  border-color: #0d66c2;
  box-shadow: 0 8px 16px rgba(13, 68, 126, 0.15);
}

.wccu-preview-node:active {
  cursor: grabbing;
  transform: scale(1.01);
}

.wccu-preview-node span {
  text-align: center;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.65);
  padding: 0.2rem;
  width: 100%;
}

.wccu-preview-node img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wccu-preview-resize {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid #ffffff;
  background: #0d66c2;
  box-shadow: 0 0 0 1px rgba(13, 102, 194, 0.3);
  cursor: nwse-resize;
}

.wccu-hotspot {
  position: absolute;
  opacity: 0.26;
  z-index: 3;
}

.wccu-modal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.wccu-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  padding: 0.42rem 0.5rem;
  background: #fbfdff;
  animation: wccuFadeIn 200ms ease;
}

.wccu-modal-item.is-editing {
  border-color: #0d66c2;
  background: #eef5ff;
}

.wccu-modal-item-main {
  border: 0;
  background: transparent;
  color: #1f3b58;
  text-align: left;
  flex: 1;
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1.3;
}

.wccu-item-thumb {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #cfdae9;
  background: #f2f6fc;
  flex-shrink: 0;
}

.wccu-item-thumb-text {
  color: var(--wccu-thumb, #1f3b58);
  font-weight: 700;
  font-size: 0.76rem;
}

.wccu-item-thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wccu-modal-item-text {
  color: #1f3b58;
  font-size: 0.84rem;
}

.wccu-remove-item {
  flex-shrink: 0;
}

#wccu-clear-all-button {
  margin-top: 0.55rem;
  margin-left: 0.4rem;
}

#wccu-undo-button {
  margin-top: 0.55rem;
}

.wccu-hidden-canvas {
  position: absolute;
  left: -99999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.wccu-modal-open {
  overflow: hidden;
}

body.wccu-dragging,
body.wccu-dragging * {
  user-select: none !important;
}

@keyframes wccuFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .wccu-modal {
    padding: 0;
  }

  .wccu-modal-card {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding-top: 2.4rem;
  }

  .wccu-modal-layout {
    grid-template-columns: 1fr;
  }

  .wccu-step-track {
    grid-template-columns: 1fr;
  }

  .wccu-preview {
    min-height: 260px;
  }
}
