/* ── Color Picker Wrapper ── */
#wcp-wrapper {
  position: fixed;
  right: 0;
  bottom: 120px;
  z-index: 5000;
  font-family: 'Montserrat', sans-serif;
}

/* ── Tab (collapsed state) ── */
.wcp-tab {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 40px;
  height: 40px;
  background: #fff;
  border: 0.5px solid rgba(212,175,55,0.4);
  border-right: none;
  border-radius: 8px 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: -2px 2px 8px rgba(0,0,0,0.1);
  transition: all .2s;
  font-size: 18px;
}
.wcp-tab:hover {
  background: #FFF9EC;
  width: 46px;
}
.wcp-tab.wcp-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Drawer ── */
.wcp-drawer {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 260px;
  background: #fff;
  border: 0.5px solid rgba(212,175,55,0.3);
  border-radius: 16px 0 0 16px;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.wcp-drawer.wcp-open {
  transform: translateX(0);
}

/* ── Header ── */
.wcp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 0.5px solid rgba(212,175,55,0.2);
  font-size: 13px;
  font-weight: 700;
  color: #3a2c2c;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.wcp-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #9a7f7f;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .2s;
}
.wcp-close:hover { background: #FFF0F5; }

/* ── Hint ── */
.wcp-hint {
  background: #FFF9EC;
  border-bottom: 0.5px solid rgba(212,175,55,0.2);
  padding: 8px 14px;
  font-size: 11px;
  color: #D4AF37;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
}

/* ── Body ── */
.wcp-body { padding: 12px 14px; }
.wcp-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a7f7f;
  margin-bottom: 8px;
  margin-top: 12px;
}
.wcp-label:first-child { margin-top: 0; }

/* ── Palettes Grid ── */
.wcp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}
.wcp-palette {
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #fafafa;
}
.wcp-palette:hover { border-color: rgba(212,175,55,0.5); background: #FFF9EC; }
.wcp-palette.wcp-active { border-color: #D4AF37; background: #FFF9EC; }

/* ── Custom Fields ── */
.wcp-field { margin-bottom: 8px; }
.wcp-field label {
  font-size: 10px;
  font-weight: 600;
  color: #9a7f7f;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 4px;
}
.wcp-field-row { display: flex; gap: 6px; align-items: center; }
.wcp-field-row input[type=color] {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.wcp-field-row input[type=text] {
  flex: 1;
  padding: 6px 8px;
  border: 0.5px solid rgba(212,175,55,0.4);
  border-radius: 6px;
  font-size: 12px;
  font-family: monospace;
  color: #3a2c2c;
  outline: none;
}
.wcp-field-row input[type=text]:focus { border-color: #D4AF37; }

/* ── Apply Button ── */
.wcp-apply {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: #D4AF37;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.06em;
  transition: opacity .2s;
}
.wcp-apply:hover { opacity: .88; }

/* ── Scrollbar ── */
.wcp-drawer::-webkit-scrollbar { width: 4px; }
.wcp-drawer::-webkit-scrollbar-track { background: transparent; }
.wcp-drawer::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.3); border-radius: 2px; }
@media (max-width: 768px) {
  #wcp-wrapper {
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 5000;
  }
  .wcp-tab {
    bottom: 80px;
    right: 0;
    position: fixed;
  }
  .wcp-drawer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .wcp-drawer.wcp-open {
    transform: translateY(0);
  }
}