/**
 * Wrestler Gimmicks Section Styles
 * Upload to: /wp-content/themes/extendable-child/wrestler-gimmicks.css
 */

/* ================== WRESTLER GIMMICKS SECTION ================== */

/* Section wrapper */
.wrestler-gimmicks-section {
  margin: 30px 0 10px;
  font-family: 'sofia-sans', sans-serif;
}

.wrestler-gimmicks-section a {
  text-decoration: none;
}

/* Heading */
.wrestler-gimmicks-title {
  display: block;
  width: 100%;
  background-color: #121921;
  padding-top: .7rem;
  padding-bottom: .5rem;
  padding-left: 1rem;
  align-items: center;
  border-radius: 10px 10px 0 0;
  box-sizing: border-box;
  font-family: 'sofia-sans', sans-serif;
  font-size: 24px;
  color: #E4DCD6;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: -10px 0 30px;
  font-weight: 500;
}

/* Grid container - CRITICAL FOR SCROLLING */
.wrestler-gimmicks-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: .5rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #3a4652 #121921;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  position: relative;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-top:5px;
  padding-right:8px;
}

/* Remove snap scrolling and enable native touch scrolling on mobile */
@media (hover: none) and (pointer: coarse) {
  .wrestler-gimmicks-grid {
    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
    cursor: auto;
    user-select: auto;
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
  }
}

/* Active dragging state */
.wrestler-gimmicks-grid.active {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.wrestler-gimmicks-grid.active * {
  pointer-events: none;
}

/* WebKit scrollbar styling */
.wrestler-gimmicks-grid::-webkit-scrollbar {
  height: 10px;
}

.wrestler-gimmicks-grid::-webkit-scrollbar-track {
  background: #121921;
  border-radius: 6px;
}

.wrestler-gimmicks-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #2b3742, #3a4652);
  border-radius: 6px;
  border: 2px solid #121921;
  transition: background .25s, box-shadow .25s, opacity .25s;
  opacity: 0;
}

/* Show scrollbar on hover */
.wrestler-gimmicks-grid:hover::-webkit-scrollbar-thumb,
.wrestler-gimmicks-grid:focus-within::-webkit-scrollbar-thumb {
  opacity: 1;
}

.wrestler-gimmicks-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #445362, #586678);
  box-shadow: 0 0 0 1px #22303a;
}

.wrestler-gimmicks-grid::-webkit-scrollbar-thumb:active {
  background: linear-gradient(90deg, #29B6F6, #66FF4E);
  box-shadow: 0 0 0 1px #0A0E13;
}

/* Card */
.wrestler-gimmicks-card {
  flex: 0 0 clamp(260px, 70vw, 320px);
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  background: #121921;
  color: #EEE;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,.35);
  transition: box-shadow .22s ease, transform .22s ease;
}

/* Remove snap align on mobile */
@media (hover: none) and (pointer: coarse) {
  .wrestler-gimmicks-card {
    scroll-snap-align: none;
  }
}

/* Image area */
.wrestler-gimmicks-img {
  aspect-ratio: 4 / 3;
  position: relative;
  background: #0A0E13;
  overflow: hidden;
}

.wrestler-gimmicks-img img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  padding-top: 20px;
  pointer-events: none;
}

/* Alignment overlays */
.wrestler-gimmicks-img::after {
  content: "";
  z-index: 0;
  position: absolute;
  inset: 0;
  background: transparent;
  mix-blend-mode: normal;
}

.wrestler-gimmicks-card[data-align="face"] .wrestler-gimmicks-img::after {
  background: linear-gradient(to top, rgba(102,255,78,.14) 0%, rgba(102,255,78,0) 100%);
}

.wrestler-gimmicks-card[data-align="heel"] .wrestler-gimmicks-img::after {
  background: linear-gradient(to top, rgba(255,74,28,.14) 0%, rgba(255,74,28,0) 100%);
}

.wrestler-gimmicks-card[data-align="tweener"] .wrestler-gimmicks-img::after {
  background: linear-gradient(to top, rgba(41,182,246,.14) 0%, rgba(41,182,246,0) 100%);
}

/* Meta body */
.wrestler-gimmicks-meta {
  flex: 1;
  padding: 1rem 1rem 1rem;
  padding-bottom:5px;
  background: #121921;
  display: flex;
  flex-direction: column;
}

/* Name */
h3.wrestler-gimmicks-name {
  margin: 0 0 .35rem;
  font-family: 'sofia-sans', sans-serif !important;
  font-size: 1.3rem !important;
  color: #CEE5F2;
  font-weight: 500;
  line-height: 1.05;
}

/* Top info line */
.wrestler-gimmicks-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4ch;
  margin: 0 0 .95rem;
  font-size: 16px;
  line-height: 1.2;
}

/* Automatic pipe between sequential spans */
.wrestler-gimmicks-line span + span:not(.wrestler-gimmicks-badge)::before {
  content: "|";
  margin: 0 .3ch;
  opacity: .75;
  color: #CEE5F2;
}

/* Promotion links separator */
.wrestler-gimmicks-promo a + a::before {
  content: "|";
  margin: 0 .5ch;
  opacity: .75;
  color: #CEE5F2;
}

/* Right-aligned badge wrapper */
.wrestler-gimmicks-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  padding-left: .6ch;
  gap: .4ch;
}

/* Badge elements */
.wrestler-gimmicks-badge-element {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1;
  padding: .35em .7em .2em;
  border-radius: 6px;
  color: #0A0E13;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
  transition: background .18s ease, transform .18s ease;
}

.wrestler-gimmicks-badge-element:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

.wrestler-gimmicks-badge-element:hover {
  transform: translateY(-1px);
}

.wrestler-gimmicks-badge-face {
  background: #56F07A;
  color: #0A0E13;
}

.wrestler-gimmicks-badge-heel {
  background: #F05664;
  color: #0A0E13;
}

.wrestler-gimmicks-badge-tweener {
  background: #29B6F6;
  color: #0A0E13;
}

.wrestler-gimmicks-badge-face:hover,
.wrestler-gimmicks-badge-face:focus-visible {
  background: #1AEB4B;
}

.wrestler-gimmicks-badge-heel:hover,
.wrestler-gimmicks-badge-heel:focus-visible {
  background: #EC293B;
}

.wrestler-gimmicks-badge-tweener:hover,
.wrestler-gimmicks-badge-tweener:focus-visible {
  background: #099ADC;
}

/* Info blocks */
.wrestler-gimmicks-info {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin: 0 0 .9rem;
  font-size: 16px;
  line-height: 1.35;
}

.wrestler-gimmicks-label {
  align-self: flex-start;
  background: #BFD1DA;
  color: #0E1A22;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: .30em .7em .32em;
  border-radius: 4px;
  line-height: 1;
}

.wrestler-gimmicks-value-f,
.wrestler-gimmicks-value-n {
  line-height: 1.35;
  color: #E6E8EE;
  word-break: break-word;
}

.wrestler-gimmicks-value-n p {
  margin: 0;
  line-height: 1.35;
}

/* Separator between info blocks */
.wrestler-gimmicks-info + .wrestler-gimmicks-info {
  margin-top: 0rem;
  padding-top: .8rem;
  border-top: 1px solid #2F3740;
}

/* Current card state */
.wrestler-gimmicks-current {
  box-shadow: 0 0 0 2px #66FF4E, 0 4px 10px -2px rgba(0,0,0,.55);
}

/* Card hover effect */
.wrestler-gimmicks-card:hover {
  box-shadow: 0 4px 14px -2px rgba(0,0,0,.55);
}

.wrestler-gimmicks-card:hover .wrestler-gimmicks-img {
  box-shadow: 0 0 0 1px rgba(255,255,255,.05),
             0 0 18px -6px rgba(255,255,255,.07) inset;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  h3.wrestler-gimmicks-name {
    font-size: 1.45rem !important;
  }

  .wrestler-gimmicks-line {
    margin: 0 0 .85rem;
    gap: 2px;
  }

  .wrestler-gimmicks-info {
    margin: 0 0 .8rem;
  }

  .wrestler-gimmicks-img {
    aspect-ratio: 1 / 1;
  }

  /* Ensure smooth native scrolling on mobile */
  .wrestler-gimmicks-grid {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto; /* Let native handle it */
    overscroll-behavior-x: contain;
  }
}

@media (max-width: 480px) {
  .wrestler-gimmicks-line {
    font-size: 15px !important;
  }

  .wrestler-gimmicks-badge-element {
    padding: 4px 8px 4px;
  }
}

@media (max-width: 360px) {
  .wrestler-gimmicks-badge {
    margin-left: 0;
    padding-left: 0;
    width: 100%;
    justify-content: flex-start;
    margin-top: .35rem;
  }

  .wrestler-gimmicks-line {
    align-items: flex-start;
  }
}