/* =========================================================
   ITEM CODE — compact slide-down redeem panel
   ========================================================= */

.itemcode-panel {
  display: none;
  left: 50%;
  max-width: calc(100vw - 24px);
  pointer-events: none;
  position: fixed;
  top: 58px;
  transform: translateX(-50%);
  width: max-content;
  z-index: 1050;
}

.itemcode-panel.is-open {
  display: block;
  pointer-events: auto;
}

.itemcode-panel-inner {
  align-items: center;
  background: #0a0a0a;
  border: 1px solid rgba(221, 171, 94, .4);
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: flex-start;
  margin: 0;
  max-width: 100%;
  padding: 10px 12px;
  width: fit-content;
}

.itemcode-label-box {
  align-items: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  font-family: Cinzel, serif;
  font-size: .95rem;
  font-weight: 700;
  gap: 2px;
  justify-content: center;
  letter-spacing: .5px;
  line-height: 1.15;
  padding: 0 4px 0 0;
  white-space: nowrap;
}

.itemcode-label-box small {
  display: none;
}

.itemcode-fields {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.itemcode-fields input {
  background: #000;
  border: 1px solid rgba(221, 171, 94, .35);
  color: #f3f4f6;
  font-family: "Segoe UI", Consolas, monospace;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: 1px;
  outline: none;
  padding: 10px 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.itemcode-fields input::placeholder {
  color: rgba(255, 255, 255, .35);
  font-weight: 500;
  letter-spacing: 1px;
}

.itemcode-fields input:focus {
  border-color: var(--gold, #ddab5e);
  box-shadow: 0 0 0 2px rgba(221, 171, 94, .18);
}

#itemCodeAccount {
  flex: 0 0 auto;
  text-transform: none;
  width: 9.5rem;
}

#itemCodeValue {
  flex: 0 0 auto;
  text-transform: uppercase;
  width: 18.5rem;
}

.itemcode-submit {
  background: linear-gradient(135deg, var(--gold-light, #e8c989), var(--gold, #ddab5e));
  border: 1px solid var(--gold, #ddab5e);
  color: #1a1400;
  cursor: pointer;
  flex-shrink: 0;
  font-family: Cinzel, serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 14px;
  text-transform: uppercase;
  transition: filter .2s ease, transform .15s ease;
  white-space: nowrap;
}

.itemcode-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.itemcode-submit:disabled {
  cursor: wait;
  opacity: .7;
}

.itemcode-msg {
  background: #0a0a0a;
  border: 1px solid rgba(221, 171, 94, .4);
  border-top: 0;
  color: #e8c989;
  font-size: .78rem;
  min-height: 0;
  padding: 6px 12px 8px;
  text-align: center;
}

.itemcode-msg:empty {
  display: none;
  padding: 0;
}

.itemcode-msg.is-error {
  color: #e8a0a0;
}

.itemcode-msg.is-ok {
  color: #9de0b0;
}

.nav-link.is-itemcode-open {
  color: var(--gold-light, #e8c989) !important;
}

@media (max-width: 767px) {
  .itemcode-panel.is-open {
    top: 56px;
    width: calc(100vw - 24px);
  }

  .itemcode-panel-inner {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .itemcode-label-box {
    align-self: flex-start;
  }

  .itemcode-fields {
    flex-wrap: wrap;
    width: 100%;
  }

  #itemCodeAccount,
  #itemCodeValue {
    flex: 1 1 auto;
    width: 100%;
  }

  .itemcode-submit {
    width: 100%;
  }
}
