/* ============================================
   CF7 PRODUCT PICKER – COMPLETE CSS WITH ORIGINAL ADD BUTTON
   ============================================ */

/* Design tokens */
.cf7-product-picker {
  --cf7pp-font-size: 14px;
  --cf7pp-font-weight: 500;
  --cf7pp-btn-radius: 10px;

  --cf7pp-btn-border: #d1d5db; /* původní border */
}

/* Wrapper */
.cf7-product-picker {
  border: 2px dashed rgb(118, 118, 118);
  padding: .75rem;
}

/* Grid */
.cf7pp-selected-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: .5rem;
}

/* Produkt karta */
.cf7pp-chip {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #e5e5e5;
  border-radius: .5rem;
  overflow: hidden;
  background: #fff;
}

.cf7pp-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   MALÉ „X” – STÁLE VIDITELNÉ
   ============================================ */

.cf7pp-remove {
  font-size: 8px;
  all: unset;
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;

  padding: 0 !important;
  width: 24px !important;
  height: 24px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  cursor: pointer !important;
  border-radius: 6px !important;
  background: rgba(180, 12, 12, 0.77) !important;
  backdrop-filter: blur(3px);

  transition: background .2s ease;
}

.cf7pp-remove:hover {
  background: rgba(180, 12, 12, 1) !important;
}

/* ============================================
   + TLAČÍTKO — PŮVODNÍ VZHLED
   ============================================ */

.cf7pp-add-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--cf7pp-btn-border) !important;
  border-radius: var(--cf7pp-btn-radius) !important;
  background: #f5f5f5 !important;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.cf7pp-add-card:hover {
  background: #efefef !important;
  border-color: #cfcfcf !important;
}

.cf7pp-add-card button {
  all: unset;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgb(118, 118, 118) !important;
  font-size: 30px !important;
  line-height: 1 !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* ============================================
   MODAL
   ============================================ */

.cf7pp-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,.35);
  place-items: center;
  z-index: 9999;
}

.cf7pp-modal-overlay.is-open {
  display: grid;
}

.cf7pp-modal {
  width: min(680px, 92vw);
  max-height: 86vh;
  background: #fff;
  border-radius: .75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
}

.cf7pp-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid #eee;
}

.cf7pp-modal-close {
  all: unset;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  font-size: 20px;
}

.cf7pp-modal-body {
  padding: .75rem 1rem 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.cf7pp-input {
  width: 100%;
  padding: .5rem .625rem;
  border: 1px solid #ddd;
  border-radius: .375rem;
  font-size: 14px;
}

.cf7pp-results {
  margin-top: .25rem;
  overflow: auto;
  flex: 1 1 auto;
  border: 1px solid #eee;
  border-radius: .375rem;
  background: #fff;
}

.cf7pp-result {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .5rem .625rem;
  border-bottom: 1px solid #f5f5f5;
}

.cf7pp-result:last-child {
  border-bottom: 0;
}

.cf7pp-thumb {
  width: 54px;
  height: 54px;
  border-radius: .375rem;
  object-fit: cover;
  background: #fafafa;
}

/* Tlačítko „Přidat“ */
.cf7pp-result-pick {
  all: unset;
  padding: .45rem .75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  background: #0ea5e9;
  color: #fff;
  transition: background .2s ease;
}

.cf7pp-result-pick:hover {
  background: #0284c7;
}
