/* =========================
   Floating counter
========================= */
.cbb-floating-counter {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  background: #111111;
  color: #ffffff;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  line-height: 1;
}

.cbb-floating-counter:hover,
.cbb-floating-counter:focus {
  color: #ffffff;
  text-decoration: none;
}

.cbb-floating-title {
  white-space: nowrap;
  font-weight: 500;
}

.cbb-floating-count {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-weight: 700;
  font-size: 12px;
  padding: 0 6px;
}

/* =========================
   Bundle manager page
========================= */
.cbb-manager {
  margin: 20px 0 40px;
}

.cbb-header {
  margin-bottom: 20px;
}

.cbb-header h2 {
  margin-bottom: 8px;
}

.cbb-header p {
  margin: 0;
}

.cbb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.cbb-card {
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  overflow: hidden;
  background: #f7f7f7;
  padding: 10px 10px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cbb-card-thumb {
  aspect-ratio: 3 / 4;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbb-card-thumb img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.cbb-thumb-placeholder {
  font-size: 18px;
  font-weight: 600;
  color: #555555;
}

.cbb-card-body {
  padding: 10px 8px 0;
}

.cbb-card-body h3 {
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 12px;
}

.cbb-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cbb-status {
  margin-top: 14px;
  font-size: 14px;
}

.cbb-empty {
  padding: 20px;
  border: 1px dashed #cccccc;
  border-radius: 10px;
  margin: 0;
  background: #ffffff;
}

/* =========================
   Bundle manager action buttons
========================= */
.cbb-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.cbb-actions .button,
.cbb-actions .button.button-primary {
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  min-width: 220px;
  text-align: center;
  box-shadow: none;
  border: none;
  text-transform: none;
}

/* Clear all = yellow */
#cbb-clear-btn {
  background: #f2c94c;
  color: #2b2b2b;
}

#cbb-clear-btn:hover,
#cbb-clear-btn:focus {
  background: #e7be43;
  color: #2b2b2b;
}

/* Download = blue */
#cbb-download-btn {
  background: #007ba7;
  color: #ffffff;
}

#cbb-download-btn:hover,
#cbb-download-btn:focus {
  background: #006b91;
  color: #ffffff;
}

#cbb-download-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Remove button = yellow */
.cbb-card-actions .button {
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: #f2c94c;
  color: #2b2b2b;
}

.cbb-card-actions .button:hover,
.cbb-card-actions .button:focus {
  background: #e7be43;
  color: #2b2b2b;
}

/* =========================
   Frontend printable cards
========================= */
.coloring-card {
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  overflow: hidden;
  background: #f7f7f7;
  padding: 10px 10px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.coloring-card .wp-block-image {
  margin-bottom: 12px;
}

.coloring-card .wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
}

.coloring-card .wp-block-heading {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.4;
}

.coloring-card .has-text-align-center {
  margin-bottom: 12px;
}

/* =========================
   Action buttons on printable cards
========================= */
.cbb-action-buttons {
  gap: 10px;
  margin-top: 14px;
}

.cbb-action-buttons .wp-block-button {
  margin: 0;
}

.cbb-action-buttons .wp-block-button__link {
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  min-width: 220px;
  text-align: center;
  box-shadow: none;
  text-decoration: none;
}

/* Download button */
.cbb-action-buttons .wp-block-button:not(.cbb-add-button) .wp-block-button__link {
  background-color: #007ba7 !important;
  color: #ffffff !important;
}

/* Add button */
.cbb-add-button .wp-block-button__link {
  background-color: #f2c94c !important;
  color: #2b2b2b !important;
}

/* Add button hover/focus */
.cbb-add-button .wp-block-button__link:hover,
.cbb-add-button .wp-block-button__link:focus {
  background-color: #e7be43 !important;
  color: #2b2b2b !important;
}

/* Added state */
.cbb-add-button .wp-block-button__link.is-added,
.cbb-add-button .wp-block-button__link.is-added:hover,
.cbb-add-button .wp-block-button__link.is-added:focus {
  background-color: #d9b53f !important;
  color: #2b2b2b !important;
  opacity: 1;
}

/* =========================
   Mobile layout
========================= */
@media (max-width: 782px) {
  .cbb-action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .cbb-action-buttons .wp-block-button {
    width: 100%;
  }

  .cbb-action-buttons .wp-block-button__link {
    display: block;
    width: 100%;
    min-width: 0;
    text-align: center;
    padding: 12px 20px;
  }

  .cbb-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cbb-actions .button,
  .cbb-actions .button.button-primary {
    width: 100%;
    min-width: 0;
    padding: 12px 20px;
  }

  .cbb-floating-counter {
    right: 12px;
    bottom: 12px;
    padding: 10px 14px;
  }
}