/* tournament.css — boxy CS style (no glow, square corners) */

.tournament-page{
  background-color: var(--page-bg-color);
  background-image: var(--page-bg-pattern);
  background-repeat: repeat;
}

.tournament-page .tb{
  height: fit-content;
}

/* each step is a full screen */
.tb-step{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 50px 16px;
}

/* inner wrapper matches your centered page feel */
.tb-step-inner{
  width: 100%;
  margin: 0 auto;
  padding-bottom: 12px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  max-width: 1200px;
}



#sticker-search{
  font-size: 12px;
}

/* Step label */
.tb-step-pill{
  text-align: center;
  font-family: Inter;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
}

/* Titles match your “Counter-Strike” look: bold, italic-ish feel */
.tb-title{
  text-align: center;
  font-family: Inter;
  font-weight: 800;
  font-style: italic;
  font-size: 44px;
  color: #fff;
  margin: 0;
}

.tb-subtitle{
  text-align: center;
  font-family: Inter;
  color: #A4A4A4;
  font-size: 14px;
  margin: 10px auto 0;
  max-width: 620px;
}

/* === STEP 1: base cards (big framed images + label bar) === */
.tb-base-grid{
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
  justify-content: center;
  justify-items: center;
  gap: 16px;
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding: 6px 0;
  place-content: center;
}

.tb-base-card{
  background: linear-gradient(to bottom, #828070, #838274);
  border: 0.25px solid rgb(143, 143, 143);
  border-radius: 2px;
  padding: 1px;
  cursor: pointer;
  justify-content: start;
  box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.35);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.tb-base-card:hover{
  box-shadow: none;
}

.tb-base-card:active{
  transform: translateY(4px);
  box-shadow: none;
}

.tb-base-frame{
  width: min(320px, 100%);
  aspect-ratio: 1 / 1;
  background: #E6E6E6;
  border: 1px solid #8A8676;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.tb-base-frame img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tb-base-label{
  background: transparent;
  border: 0;
  padding: 10px 6px;
  text-align: center;
  font-family: Inter;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  font-size: 16px;
}

/* Selected state: orange border + label */
.tb-base-card.is-selected .tb-base-frame,
.tb-base-card.is-selected .tb-base-label{
  border-color: #F28C28;
}

/* === STEP 2: size === */
.tb-size-tools{
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.tb-size-grid{
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 120px;
  justify-content: center;
  gap: 16px;
}

.tb-size-card{
  border: 0.25px solid rgb(143, 143, 143);
  background: linear-gradient(to bottom, #828070, #838274);
  box-shadow: 0 6px 10px rgba(0,0,0,0.35);
  color: #fff;
  font-family: Inter;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.tb-size-card.is-selected{
  background: #F28C28;
  border-color: #da812b;
}

/* === STEP 3: builder layout === */
.tb-step-3{
  padding-top: 20px;
  margin-bottom: 100px;
}

.tb-builder{
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

/* Top controls row (search + filters) */
.tb-top-controls{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.tb-search{
  position: relative;
}

.tb-search input{
  width: 100%;
  padding: 12px 14px 12px 48px;
  background: #5A584F;
  border: 1px solid rgba(0,0,0,0.6);
  color: #fff;
  font-family: Inter;
  font-size: 18px;
  outline: none;
  border-radius: 2px;
}

.tb-search input::placeholder{
  color: rgba(255,255,255,0.55);
}

.tb-search-icon{
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

/* Filter buttons (square, no glow) */
.tb-filters{
  display: flex;
  gap: 12px;
}

.tb-filter-btn{
    width: fit-content;
  height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #7c7a6b;
  background: linear-gradient(to bottom, #7c7a6b, #6e6c60);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.35);
  transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.tb-filter-btn.is-active{
  background: linear-gradient(to bottom, #da812b, #b0671f);
  border-color: #da812b;
  box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.45);
}

/* grid scroll area */
.tb-grid-scroll{
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding-right: 6px;
}

/* 7-column grid like reference */
.tb-grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

/* Sticker cards */
.tb-sticker-card{
  background: #1F1E19;
  border: 1px solid rgba(0,0,0,0.6);
  cursor: pointer;
  padding: 4px;
  position: relative;
}

.tb-sticker-img{
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #1F1E19;
}

.tb-sticker-img img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tb-sticker-meta{
  padding: 8px;
  margin-top: 8px;
  min-height: 60px;
}

.tb-sticker-team{
  font-family: Inter;
  font-weight: 600;
  text-align: left;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tb-sticker-event{
  margin-top: 4px;
  font-family: Inter;
  text-align: left;
  font-size: 10px;
  color: rgba(255,255,255,0.55);
}

.tb-sticker-card.is-selected{
  outline: 3px solid #F28C28; /* hard, CS-like selection */
  outline-offset: -3px;
}

.tb-sticker-badges{
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.tb-sticker-count{
  background: #da812b;
  color: #1f1e19;
  font-family: Inter;
  font-weight: 800;
  font-size: 11px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tb-sticker-remove{
  background: #da812b;
  color: #1f1e19;
  font-family: Inter;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  border: none;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35);
}

/* Right preview panel */
.tb-preview-panel{
  background: #7C796B;
  border: 6px solid #8A8676;
  box-shadow: 0 8px 14px rgba(0,0,0,0.35);
  height: fit-content;
  gap: 4px;
  display: flex;
  flex-direction: column;
}

.tb-preview-frame{
  background: #E6E6E6;
  border-bottom: 0.25px solid #8A8676;
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.tb-preview-frame img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tb-inline-error{
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #da812b;
  color: #1f1e19;
  font-family: Inter;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
  text-align: center;
  max-width: 90%;
}

.tb-inline-error.is-visible{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* four small overlay slots on garment */
.tb-preview-slots{
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translateX(-50%);
  width: 40%;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.tb-preview-slot{
  aspect-ratio: 1 / 1;
  background: rgba(0,0,0,0.12);
  border: 2px solid rgba(0,0,0,0.22);
}
.tb-preview-slot img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.tb-preview-slot.is-empty{
  opacity: 0;
}

.tb-preview-sticker{
  flex: 0 0 calc((100% - (4px * 3)) / 4);
  aspect-ratio: 1 / 1;
  background: rgba(0,0,0,0.12);
  border: 2px solid rgba(0,0,0,0.22);
  display: grid;
  place-items: center;
}

.tb-preview-sticker img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* reorder row */
.tb-reorder-area{
  padding: 12px;
  border-bottom: 0.25px solid #8A8676;
  background: #7C796B;
  flex: 0 0 auto;
}

.tb-reorder-row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tb-reorder-tile{
  aspect-ratio: 1 / 1;
  background: #1F1E19;
  border: 1px solid rgba(0,0,0,0.55);
}
.tb-reorder-tile img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tb-reorder-hint{
  margin-top: 10px;
  text-align: center;
  font-family: Inter;
  font-size: 12px;
  color: rgba(0,0,0,0.55);
}

/* summary */
.tb-order-summary{
  padding: 14px 14px 16px;
  background: #7C796B;
  flex: 1;
}

.tb-summary-row{
  display: flex;
  justify-content: space-between;
  font-family: Inter;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(0,0,0,0.65);
  padding: 6px 0;
}

.tb-add{
  width: 100%;
  margin-top: 14px;
  border-radius: 2px; /* match your site buttons */
}

/* Overlay + Sheet (square, no blur-glow) */

.tb-sheet{
  position: fixed;
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(90vw, 500px);
  max-height: 400px;
  background: var(--drawer-bg);
  border: none;
  box-shadow: var(--drawer-shadow);
  z-index: 9999;
  transition: transform 220ms ease, opacity 180ms ease;
  border-radius: var(--drawer-radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.tb-sheet.is-open{
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: auto;
}

.tb-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 9998;
}

.tb-overlay.is-open{
  opacity: 1;
  pointer-events: auto;
}

.tb-sheet-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
}

.tb-sheet-title{
  font-family: Inter;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
  font-size: 16px;
}

.tb-sheet-close{
  width: 40px;
  height: 40px;
  border: none;
  background: none;
}

.tb-sheet-body{
  padding: 0;
  overflow: auto;
  max-height: calc(80vh - 56px);
  display: flex;
  flex-direction: column;
  background: transparent;
}

body.sheet-open{
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.tb-sheet-option{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  margin: 0;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: #fff;
  font-family: Inter;
  font-weight: 700;
  cursor: pointer;
}

#step-1{
    padding-top: 0px;
}
.tb-sheet-option.is-selected{
  outline: 3px solid #F28C28;
  outline-offset: -3px;
  background: rgba(255,255,255,0.05);
}

/* Responsive */
@media (max-width: 900px){
  .tb-base-grid{
    grid-template-columns: 1fr;
    width: 100%;
  }

  .tb-builder{
    grid-template-columns: 1fr;
  }

  .tb-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tb-grid-scroll{
    max-height: 520px;
  }

  .tb-size-grid{
    grid-template-columns: repeat(2, 1fr);
    width: min(520px, 100%);
    margin-left: auto;
    margin-right: auto;
  }
}
@media (min-width: 900px){
#floating-reorder-row{
 display: none;
}

#step-3{
  margin-bottom: 0px;
  padding-bottom: 0px;
}
.tb-step-3{
  margin-bottom: 0px;
}
}
