/* Container & header row */
.dydaps-gc-block {
  margin-top: 10px;
}

/* --- Banner teaser styles --- */
.dydaps-gc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #1b1b1f 0%, #2b2b31 60%, #3a3a44 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .08);
}

.dydaps-gc-banner-left {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

.dydaps-gc-banner .dydaps-gc-icon {
  color: #fff;
  display: inline-flex;
}

.dydaps-gc-text {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
  color: #f5f5f7;
  font-size: .95rem;
}

.dydaps-gc-title-inline {
  font-weight: 800;
  letter-spacing: .2px;
}

.dydaps-gc-sep {
  opacity: .6;
}

.dydaps-gc-budget strong {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
}

.dydaps-gc-actions {
  flex: 0 0 auto;
}

.dydaps-gc-open.btn {
  border-radius: 999px;
  padding: .5rem 1rem;
  font-weight: 700;
  font-size: .9rem;
  border: 1px solid rgba(255, 255, 255, .22);
  background: #ffffff;
  color: #1b1b1f;
}

.dydaps-gc-open.btn:hover {
  filter: brightness(.96);
}

/* Banner is clickable like a button */
.dydaps-gc-banner[role="button"] {
  cursor: pointer;
}

/* Hover/active feedback while keeping your gradient */
.dydaps-gc-banner[role="button"]:hover {
  filter: brightness(1.02);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

.dydaps-gc-banner[role="button"]:active {
  transform: translateY(1px);
}

/* Keyboard focus ring on the whole banner */
.dydaps-gc-banner[role="button"]:focus,
.dydaps-gc-banner[role="button"]:focus-visible {
  outline: none;
  /* remove default outline to avoid double rings */
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, .15),
    0 0 0 6px rgba(30, 135, 240, .65);
}

/* Keep the standalone button looking focused inside the banner */
.dydaps-gc-open.btn:focus,
.dydaps-gc-open.btn:focus-visible {
  outline: 2px solid rgba(30, 135, 240, .9);
  outline-offset: 2px;
}

/* Mobile: avoid tiny press-shift on small screens */
@media (max-width: 600px) {
  .dydaps-gc-banner[role="button"]:active {
    transform: none;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .dydaps-gc-banner {
    align-items: stretch;
    flex-direction: column;
    gap: .6rem;
  }

  .dydaps-gc-open.btn {
    width: 100%;
    text-align: center;
  }
}

/* Modal backdrop */
.dydaps-gc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 99999;
}

/* Modal content */
.dydaps-gc-modal-content {
  background: #fff;
  max-width: 900px;
  margin: 5vh auto;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}

.dydaps-gc-modal .dydaps-gc-icon {
  color: #2b2b31;
  display: inline-flex;
}

.dydaps-gc-close {
  position: absolute;
  top: .6rem;
  right: .6rem;
  background: transparent;
  border: none;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

/* Header */
.dydaps-gc-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: .5rem;
}

.dydaps-gc-title {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.dydaps-gc-h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .2px;
}

.dydaps-gc-sub {
  color: #555;
  margin: .25rem 0 .5rem;
}

/* Tabs */
.dydaps-gc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 .5rem;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: .4rem;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.dydaps-gc-tab {
  background: #f7f7f7;
  border: 1px solid #e3e3e3;
  border-radius: 999px;
  padding: .35rem .8rem;
  cursor: pointer;
  transition: all .2s ease;
  font-weight: 700;
  font-size: .85rem;
}

.dydaps-gc-tab:hover {
  background: #efefef;
}

.dydaps-gc-tab.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Grid */
.dydaps-gc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

/* Card: reduced height (uniform) */
.dydaps-gc-item {
  position: relative;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  transition: box-shadow .2s ease, transform .06s ease, filter .2s ease, opacity .2s ease;
  display: flex;
  flex-direction: column;
  height: 280px;
}

.dydaps-gc-item:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}

/* Gray-out when locked */
.dydaps-gc-item.is-locked {
  opacity: .55;
}

.dydaps-gc-item.is-locked .dydaps-gc-img img {
  filter: grayscale(100%);
}

.dydaps-gc-item.is-locked .dydaps-gc-img-link {
  pointer-events: none;
}

/* Image area */
.dydaps-gc-img {
  position: relative;
  display: block;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.dydaps-gc-img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.dydaps-gc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.dydaps-gc-item:hover .dydaps-gc-img img {
  transform: scale(1.04);
}

/* FREE pill */
.dydaps-gc-pill {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: #111;
  color: #fff;
  font-size: .7rem;
  padding: .2rem .45rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}

/* Lock bubble */
.dydaps-gc-lock {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(17, 17, 17, .9);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
}

.dydaps-gc-item.is-locked .dydaps-gc-lock {
  display: inline-flex;
}

/* Bottom actions bar on image (hidden until hover/focus) */
.dydaps-gc-actions-bottom {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}

.dydaps-gc-item:hover .dydaps-gc-actions-bottom,
.dydaps-gc-item:focus-within .dydaps-gc-actions-bottom {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Select (variants) */
.dydaps-gc-combo {
  width: 100%;
  border: 1px solid #e3e3e3;
  background: #fff;
  border-radius: 10px;
  padding: .4rem .6rem;
  font-size: .9rem;
}

.dydaps-gc-combo:disabled {
  opacity: .6;
}

/* Add button */
.dydaps-gc-add {
  border-radius: 999px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  padding: .4rem .9rem;
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
}

.dydaps-gc-add:hover {
  color: #111;
  background: #fff;
  filter: brightness(0.98);
}

.dydaps-gc-add.dydaps-gc-disabled, .dydaps-gc-add:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* Meta under image */
.dydaps-gc-meta {
  padding: .55rem .7rem .7rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1 1 auto;
  min-height: 74px;
}

.dydaps-gc-name {
  font-weight: 700;
  font-size: .95rem;
  color: #111;
  text-decoration: none;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dydaps-gc-name:hover {
  text-decoration: underline;
}

.dydaps-gc-price-row {
  color: #666;
  font-size: .85rem;
}

.dydaps-gc-price-old {
  text-decoration: line-through;
  opacity: .75;
}

/* States */
.dydaps-gc-loading, .dydaps-gc-error {
  padding: 12px;
  border: 1px dashed #d6d6d6;
  border-radius: 10px;
  background: #fafafa;
  text-align: center;
}

/* Footer */
.dydaps-gc-footer {
  margin-top: .75rem;
  display: flex;
  justify-content: flex-end;
}

.dydaps-gc-done {
  border-radius: 999px;
  border: 1px solid #e3e3e3;
  background: #f7f7f7;
  padding: .45rem .9rem;
}

.dydaps-gc-done:hover {
  background: #efefef;
}

/* Toast notifications */
#dydaps-toast-container {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 20050;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
  align-items: flex-end;
}

.dydaps-toast {
  background: #333;
  color: #fff;
  padding: .75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  font-size: .875rem;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity .3s ease, transform .3s ease;
  will-change: opacity, transform;
  pointer-events: auto;
  max-width: min(92vw, 420px);
  overflow-wrap: anywhere;
}

.dydaps-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.dydaps-toast.error {
  background: #d43f3a;
}

.dydaps-toast.success {
  background: #28a745;
}

/* Responsive */
@media (max-width: 600px) {
  #dydaps-toast-container {
    left: max(.75rem, env(safe-area-inset-left));
    right: max(.75rem, env(safe-area-inset-right));
    align-items: stretch;
  }

  .dydaps-gc-item {
    height: 260px;
  }
}

@media (max-width: 480px) {
  .dydaps-gc-modal-content {
    max-width: 96vw;
    padding: .9rem;
  }

  .dydaps-gc-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
}

/* Visually hidden (for a11y) */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Infinite scroll sentinel (kept minimal on purpose) */
#dydaps-gc-sentinel {
  height: 1px;
  overflow-anchor: none;
}

#dydaps-gc-sentinel.is-loading {
  height: auto;
}