/* Tibipedia shop: compact modern offer tables, pill category nav, small buy buttons */

/* Category navigator as pills */
.tp-shop-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.tp-shop-nav .nav_link {
  display: inline-flex; align-items: center; padding: 5px 12px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-decoration: none;
  color: var(--brand-text-soft, #d6cfc0) !important;
  background: rgb(255 255 255 / .04);
  border: 1px solid var(--brand-border, #2e2638); border-radius: 999px;
  transition: background .15s, border-color .15s, color .15s;
}
.tp-shop-nav .nav_link:hover { border-color: var(--brand-accent-strong, #9e7126); color: var(--brand-text, #f3eee2) !important; }
.tp-shop-nav .nav_link.is-active {
  color: var(--brand-accent-contrast, #0c0a13) !important;
  background: var(--brand-gradient-gold, linear-gradient(180deg, #e9c973, #e0b249 55%, #9e7126));
  border-color: var(--brand-accent-strong, #9e7126);
}

/* Offer tables */
table.tp-shop-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 12px; font-size: 13px; }
table.tp-shop-table tr.yellow td {
  padding: 7px 12px !important; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
}
table.tp-shop-table tr.special td { padding: 6px 12px !important; vertical-align: middle; }
table.tp-shop-table tr.special:hover td { background: rgb(var(--brand-accent-rgb, 224 178 73) / .05); }
table.tp-shop-table td:last-child { text-align: right; width: 1%; white-space: nowrap; }
table.tp-shop-table img { max-height: 40px; vertical-align: middle; image-rendering: pixelated; }
table.tp-shop-table form { margin: 0; display: inline; }

/* Buy button */
.tp-shop-buy {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 0 !important; height: 28px !important; padding: 0 14px 0 30px !important; margin: 0 !important;
  font: 700 12px/1 var(--brand-font-sans, system-ui, sans-serif) !important; letter-spacing: .03em; text-transform: none !important;
  color: var(--brand-accent-contrast, #0c0a13) !important;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c0a13' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/%3E%3C/svg%3E") 11px center / 14px no-repeat,
    var(--brand-gradient-gold, linear-gradient(180deg, #e9c973, #e0b249 55%, #9e7126)) !important;
  border: 1px solid var(--brand-accent-strong, #9e7126) !important; border-radius: 999px !important;
  box-shadow: 0 2px 8px rgb(224 178 73 / .18), inset 0 1px 0 rgb(255 255 255 / .35) !important;
  cursor: pointer; transition: filter .12s, transform .12s, box-shadow .12s;
}
.tp-shop-buy:hover { filter: brightness(1.08); box-shadow: 0 0 14px rgb(224 178 73 / .4), inset 0 1px 0 rgb(255 255 255 / .35) !important; }
.tp-shop-buy:active { transform: translateY(1px); }
.tp-shop-buy:focus-visible { outline: 2px solid var(--brand-accent, #e0b249); outline-offset: 2px; }

@media (max-width: 600px) {
  table.tp-shop-table tr.yellow td, table.tp-shop-table tr.special td { padding: 6px 8px !important; }
  .tp-shop-buy { padding: 0 10px 0 26px !important; background-position: 8px center, 0 0 !important; }
}
@media (prefers-reduced-motion: reduce) { .tp-shop-buy, .tp-shop-nav .nav_link { transition: none; } }

/* Category filtering (the page script toggles show/hide) */
table.tp-shop-table.hide { display: none; }

/* Wallet / balance card */
.tp-shop-wallet {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 4px 0 12px; padding: 10px 12px;
  background: linear-gradient(100deg, rgb(224 178 73 / .10), rgb(255 255 255 / .02) 60%);
  border: 1px solid var(--brand-border, #2e2638); border-radius: 12px;
}
.tp-shop-wallet__coin {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%;
  color: var(--brand-accent-contrast, #0c0a13);
  background: var(--brand-gradient-gold, linear-gradient(180deg, #e9c973, #e0b249 55%, #9e7126));
  box-shadow: 0 0 12px rgb(224 178 73 / .3), inset 0 1px 0 rgb(255 255 255 / .4);
}
.tp-shop-wallet__info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.tp-shop-wallet__label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text-muted, #a8a092); }
.tp-shop-wallet__value { font-size: 14px; color: var(--brand-text-soft, #d6cfc0); }
.tp-shop-wallet__value strong { font-size: 20px; color: var(--brand-accent, #e0b249); margin-right: 2px; }
.tp-shop-wallet__cta {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px;
  font-size: 12.5px; font-weight: 700; text-decoration: none !important; border-radius: 999px;
  color: var(--brand-text, #f3eee2) !important; background: rgb(255 255 255 / .05);
  border: 1px solid var(--brand-accent-strong, #9e7126); transition: background .15s, box-shadow .15s;
}
.tp-shop-wallet__cta:hover { background: rgb(224 178 73 / .15); box-shadow: 0 0 10px rgb(224 178 73 / .25); }
.tp-shop-wallet__cta:focus-visible { outline: 2px solid var(--brand-accent, #e0b249); outline-offset: 2px; }

/* No points: the Buy points button calls for attention */
.tp-shop-wallet__cta.is-urgent {
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--brand-accent-contrast, #0c0a13) !important;
  background: var(--brand-gradient-gold, linear-gradient(180deg, #e9c973, #e0b249 55%, #9e7126));
  border-color: #f0b43c;
  animation: tpBuyAlarm 1.2s ease-in-out infinite;
}
.tp-shop-wallet__cta.is-urgent::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 244 200 / .6) 50%, transparent 70%);
  transform: translateX(-120%); animation: tpBuyShine 1.8s ease-in-out infinite;
}
.tp-shop-wallet__cta.is-urgent svg { animation: tpBuyIcon 1.2s ease-in-out infinite; }
@keyframes tpBuyAlarm {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgb(240 150 40 / .45); }
  50% { transform: scale(1.07); box-shadow: 0 0 22px rgb(255 170 50 / .9); }
}
@keyframes tpBuyShine { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(120%); } }
@keyframes tpBuyIcon { 50% { transform: rotate(90deg) scale(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .tp-shop-wallet__cta.is-urgent, .tp-shop-wallet__cta.is-urgent::after, .tp-shop-wallet__cta.is-urgent svg { animation: none; }
}

/* D30 */
/* shop.php: Premium moved to premium.php */
.tp-shop-premium-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 12px; padding: 14px 16px;
  background: linear-gradient(90deg, rgb(var(--brand-accent-rgb) / .12), rgb(var(--brand-accent-rgb) / .03));
  border: 1px solid rgb(var(--brand-accent-rgb) / .4); border-radius: var(--brand-radius-lg);
}
.tp-shop-premium-cta.hide { display: none; }
.tp-shop-premium-cta__text { display: grid; gap: 2px; font-size: 12.5px; color: var(--brand-text-muted); }
.tp-shop-premium-cta__text strong { font-size: 15px; color: var(--brand-text); }

/* D34: local offer icons (replace the external item images) + purchase messages */
.tp-shop-icon {
  width: 34px; height: 34px; display: inline-grid; place-items: center; vertical-align: middle; border-radius: 10px;
  color: var(--brand-accent, #e0b249); background: rgb(var(--brand-accent-rgb, 224 178 73) / .12);
  border: 1px solid rgb(var(--brand-accent-rgb, 224 178 73) / .35);
}
.tp-shop-msg { margin: 6px 0 12px; padding: 10px 14px; font-size: 13px; border-radius: 10px; border: 1px solid var(--brand-border, #2e2638); }
.tp-shop-msg a { color: var(--brand-accent, #e0b249) !important; font-weight: 700; }
.tp-shop-msg--ok { color: var(--brand-success-text, #9be3a8); background: rgb(var(--brand-success-rgb, 40 140 70) / .14); border-color: rgb(var(--brand-success-text-rgb, 155 227 168) / .4); }
.tp-shop-msg--error { color: var(--brand-danger-text, #f0a090); background: rgb(var(--brand-danger-rgb, 220 80 60) / .12); border-color: rgb(var(--brand-danger-rgb, 220 80 60) / .4); }
.tp-shop-buy[disabled] { opacity: .6; cursor: progress; }
