/*
 * Football Directory redesign (/football-directory and each profile page), loaded after style_index_min.css.
 * The templates keep their markup and texts; hook classes: main.sd-dir, sd-dir-hero, sd-dir-filter,
 * sd-dir-list, sd-dir-card--<type of account>, sd-dir-type.
 * On the profile page the type of account takes a persona colour: club green, agency purple, scout teal, coach blue.
 * The profile cards of the list stay simple, close to their original look.
 */

/* ------------------------------------------------------------------ Tokens */

.sd-dir {
  overflow-x: clip;
  --sd-text: #1B2333;
  --sd-body: #435066;
  --sd-muted: #5F6A7D;
  --sd-line: #E3E8EF;
  --sd-ground: #F2F4F7;
  --sd-card: #FFFFFF;
  --sd-navy: #111827;
  --sd-green: #50D878;
  --sd-green-text: #157A43;
  --sd-radius: 1rem;
  --sd-shadow: 0 1px 2px rgba(27, 35, 51, 0.06), 0 12px 28px -16px rgba(27, 35, 51, 0.35);
  --sd-shadow-hover: 0 2px 4px rgba(27, 35, 51, 0.06), 0 28px 48px -20px rgba(27, 35, 51, 0.5);
  /* Default type colour, replaced per type of account below */
  --sd-type: #29364D;
  --sd-type-soft: #E8ECF1;
  display: flow-root;
  background: var(--sd-ground) !important;
}

.sd-dir section {
  margin-bottom: 0 !important;
}

/* Type of account colours (persona palette) */
.sd-dir-card--club,
.sd-dir--club { --sd-type: #226F18; --sd-type-soft: #E3F1E0; }
.sd-dir-card--agency,
.sd-dir--agency { --sd-type: #611F69; --sd-type-soft: #F1E3F3; }
.sd-dir-card--scout_and_analyst,
.sd-dir--scout_and_analyst { --sd-type: #136B6B; --sd-type-soft: #DDF3F3; }
.sd-dir-card--coach,
.sd-dir--coach { --sd-type: #1F55B8; --sd-type-soft: #E1EBFD; }

/* ------------------------------------------------------------------ Hero (dark, as the other redesigned dark panels) */

.sd-dir .sd-dir-hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 4.5rem !important;
  background-color: var(--sd-navy) !important;
  background-image:
    radial-gradient(ellipse 50% 90% at 85% 0%, rgba(80, 216, 120, 0.18) 0%, transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}

.sd-dir .sd-dir-hero::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(80, 216, 120, 0.55) 50%, transparent 100%);
}

.sd-dir .sd-dir-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  font-weight: 800 !important;
  letter-spacing: -1.5px;
  line-height: 1.05;
}

.sd-dir .sd-dir-hero .lead {
  color: #C9D2E0 !important;
}

/* Number of profiles as a green pill */
.sd-dir .sd-dir-hero .badge.bk-success {
  padding: 0.75rem 1.25rem !important;
  border-radius: 999px;
  background: var(--sd-green) !important;
  color: var(--sd-navy) !important;
  font-weight: 800;
  box-shadow: 0 0 0 6px rgba(80, 216, 120, 0.15);
}

/* Profile page: logo in a white circle, links card in glass */
.sd-dir .sd-dir-hero--profile {
  padding-bottom: 4rem !important;
}

.sd-dir .sd-dir-hero--profile img[width="84"] {
  width: 5.5rem;
  height: 5.5rem;
  padding: 0.625rem;
  border-radius: 50%;
  background: #FFFFFF;
  object-fit: contain;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08), 0 16px 32px -12px rgba(0, 0, 0, 0.6);
}

.sd-dir .sd-dir-hero--profile h1 {
  font-size: clamp(2rem, 4vw, 3rem) !important;
}

.sd-dir .sd-dir-hero--profile .card {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #FFFFFF;
}

.sd-dir .sd-dir-hero--profile .card h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sd-green);
}

.sd-dir .sd-dir-hero--profile .card hr {
  border-color: rgba(255, 255, 255, 0.15);
  opacity: 1;
}

.sd-dir .sd-dir-hero--profile .card .text-muted {
  color: #C9D2E0 !important;
}

/* Profile links as pills */
.sd-dir .sd-dir-hero--profile .card .btn-sm {
  padding: 0.375rem 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: transparent;
  color: #FFFFFF;
  font-weight: 600;
}

.sd-dir .sd-dir-hero--profile .card .btn-sm:is(:hover, :focus-visible) {
  border-color: var(--sd-green);
  background: var(--sd-green);
  color: var(--sd-navy);
}

/* Type of account pill (profile page) */
.sd-dir .sd-dir-hero .sd-dir-type {
  padding: 0.3125rem 0.625rem;
  border-radius: 999px;
  background: var(--sd-type-soft) !important;
  color: var(--sd-type) !important;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ Filters: search bar on the light ground, site-styled dropdowns, type shortcuts */

.sd-dir .sd-dir-filter {
  position: relative;
  z-index: 2;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 2.5rem;
}

/* The bar: white, with a gradient line on top, a soft green glow in the corner and a deep shadow */
.sd-dir .sd-dir-filter .card {
  position: relative;
  overflow: visible;
  border: 1px solid var(--sd-line) !important;
  border-radius: 1.5rem;
  background-color: #FFFFFF;
  background-image: radial-gradient(ellipse 40% 140% at 100% 0%, rgba(80, 216, 120, 0.12) 0%, transparent 70%);
  box-shadow: 0 2px 4px rgba(27, 35, 51, 0.04), 0 32px 64px -32px rgba(17, 24, 39, 0.5) !important;
}

.sd-dir .sd-dir-filter .card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 2rem;
  right: 2rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--sd-green) 0%, #2EA3A3 50%, #4F86E8 100%);
}

.sd-dir .sd-dir-filter .card-body {
  padding: 1.5rem 1.5rem 1.25rem !important;
}

.sd-dir .sd-dir-filter h2 {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1rem 0.25rem !important;
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sd-green-text) !important;
}

.sd-dir .sd-dir-filter h2::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  border-radius: 2px;
  background: var(--sd-green);
}

/* Each filter is a tile: dark icon square, small label and the current choice */
.sd-dir .sd-dir-filter form.row > [class*="col-md-4"] {
  position: relative;
}

.sd-dir .sd-dir-filter .form-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 0.25rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sd-muted);
  cursor: pointer;
}

.sd-dir .sd-dir-filter .form-label i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  background: var(--sd-navy);
  color: var(--sd-green);
  font-size: 0.8125rem;
  box-shadow: 0 6px 12px -6px rgba(17, 24, 39, 0.6);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.sd-dir .sd-dir-filter form.row > [class*="col-md-4"]:hover .form-label i,
.sd-dir .sd-dir-filter form.row > [class*="col-md-4"]:focus-within .form-label i {
  background: var(--sd-green);
  color: var(--sd-navy);
  transform: rotate(-6deg) scale(1.05);
}

/* Native select (only seen without the script) */
.sd-dir .sd-dir-filter .form-select {
  min-height: 3rem;
  border: 1px solid var(--sd-line);
  border-radius: 0.75rem;
  background-color: var(--sd-ground);
  color: var(--sd-text);
  font-weight: 700;
}

.sd-dir .sd-dir-filter .form-select.sd-dd-native {
  display: none;
}

/* ------------------------------------------------------------------ Dropdowns (directory_filters.js) */

.sd-dd {
  position: relative;
}

.sd-dd-toggle {
  position: relative;
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 2.5rem 0.625rem 0.875rem;
  overflow: hidden;
  border: 1.5px solid transparent;
  border-radius: 0.875rem;
  background: var(--sd-ground);
  color: var(--sd-text);
  font-size: 1.0625rem;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

/* Chevron, turned up while open */
.sd-dd-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.875rem;
  width: 0.875rem;
  height: 0.875rem;
  margin-top: -0.4375rem;
  background-color: var(--sd-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .25s ease;
}

.sd-dd-toggle:hover {
  border-color: var(--sd-line);
  background: #FFFFFF;
}

.sd-dd-toggle:focus-visible,
.sd-dd.is-open .sd-dd-toggle {
  outline: 0;
  border-color: var(--sd-green);
  background: #FFFFFF;
  box-shadow: 0 0 0 0.25rem rgba(80, 216, 120, 0.2);
}

.sd-dd.is-open .sd-dd-toggle::after {
  transform: rotate(180deg);
}

/* Panel: dark navy list, as the dropdown menus of the top bar */
.sd-dd-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  min-width: 15rem;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: #1F2A3D;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.375rem);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.sd-dd.is-open .sd-dd-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .18s ease, transform .18s ease;
}

.sd-dd-search {
  width: 100%;
  height: 2.75rem;
  margin-bottom: 0.5rem;
  padding: 0 0.875rem 0 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C98AB' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 0.75rem center / 1rem no-repeat;
  color: #FFFFFF;
  font-size: 0.9375rem;
}

.sd-dd-search::placeholder {
  color: #8C98AB;
}

.sd-dd-search:focus {
  outline: 0;
  border-color: var(--sd-green);
}

.sd-dd-list {
  max-height: 18rem;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.sd-dd-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  color: #C9D2E0;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.sd-dd-option.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

/* Current choice: white text with a green tick */
.sd-dd-option.is-selected {
  color: #FFFFFF;
  font-weight: 700;
}

.sd-dd-option.is-selected::after {
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  background-color: var(--sd-green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ------------------------------------------------------------------ Filter and Reset buttons */

/* Filter: the same look as Try For Free (shared button tokens) */
.sd-dir .sd-dir-filter .btn-900 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: var(--sd-btn-padding-y) var(--sd-btn-padding-x) !important;
  border: var(--sd-btn-border-width) solid var(--sd-btn-primary-bg);
  border-radius: var(--sd-btn-radius);
  background: var(--sd-btn-primary-bg);
  color: var(--sd-btn-primary-color);
  font-size: var(--sd-btn-font-size);
  font-weight: var(--sd-btn-font-weight);
  line-height: var(--sd-btn-line-height);
  transition: var(--sd-btn-transition);
}

.sd-dir .sd-dir-filter .btn-900 i {
  font-size: 0.875em;
}

.sd-dir .sd-dir-filter .btn-900:is(:hover, :focus-visible, :active) {
  border-color: var(--sd-btn-primary-bg-hover);
  background: var(--sd-btn-primary-bg-hover);
  color: var(--sd-btn-primary-color);
}

.sd-dir .sd-dir-filter .btn-900:focus-visible {
  outline: 0;
  box-shadow: var(--sd-btn-focus-ring);
}

/* Reset: quiet text button */
.sd-dir .sd-dir-filter .btn-outline-900 {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 0.75rem !important;
  border: 0;
  border-radius: var(--sd-btn-radius);
  background: transparent;
  color: var(--sd-muted);
  font-weight: 700;
}

.sd-dir .sd-dir-filter .btn-outline-900:is(:hover, :focus-visible) {
  background: var(--sd-ground);
  color: var(--sd-text);
}

/* Large screens: one row, tiles separated by thin lines, buttons at the end */
@media (min-width: 992px) {
  .sd-dir .sd-dir-filter form.row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 0;
    margin: 0;
  }

  .sd-dir .sd-dir-filter form.row > * {
    width: auto;
    margin: 0;
    padding: 0 0.75rem;
  }

  .sd-dir .sd-dir-filter form.row > [class*="col-md-4"]:first-child {
    padding-left: 0;
  }

  .sd-dir .sd-dir-filter form.row > .col-12.d-flex {
    padding-right: 0;
  }
}

/* ------------------------------------------------------------------ Quick shortcuts by type of account */

.sd-dir .sd-dir-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0 0.5rem;
}

.sd-dir .sd-dir-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--sd-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, transform .2s ease, background-color .2s ease;
}

/* Dot in the persona colour of each type */
.sd-dir .sd-dir-chip::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--sd-chip, var(--sd-green));
}

.sd-dir .sd-dir-chip--club { --sd-chip: #4CAF3F; }
.sd-dir .sd-dir-chip--agency { --sd-chip: #A65BB0; }
.sd-dir .sd-dir-chip--scout_and_analyst { --sd-chip: #2EA3A3; }
.sd-dir .sd-dir-chip--coach { --sd-chip: #4F86E8; }
.sd-dir .sd-dir-chip--company { --sd-chip: #8C98AB; }

.sd-dir .sd-dir-chip:hover,
.sd-dir .sd-dir-chip:focus-visible {
  border-color: var(--sd-chip, var(--sd-green));
  color: var(--sd-text);
  transform: translateY(-1px);
}

.sd-dir .sd-dir-chip.is-active {
  border-color: var(--sd-navy);
  background: var(--sd-navy);
  color: #FFFFFF;
}

/* ------------------------------------------------------------------ Profile cards (simple, with a gentle entrance) */

.sd-dir .sd-dir-list {
  padding-top: 2rem;
}

.sd-dir .sd-dir-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--sd-line) !important;
  border-radius: var(--sd-radius) !important;
  box-shadow: var(--sd-shadow) !important;
  transition: transform .32s cubic-bezier(.22, 1, .36, 1), box-shadow .32s ease, border-color .32s ease !important;
}

/* Green line that grows along the top of the card when pointed at */
.sd-dir .sd-dir-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sd-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}

.sd-dir .sd-dir-card:hover {
  border-color: rgba(80, 216, 120, 0.5) !important;
  box-shadow: var(--sd-shadow-hover) !important;
}

.sd-dir .sd-dir-card:hover::before {
  transform: scaleX(1);
}

/* Logo in a fixed square, so names line up from card to card */
.sd-dir .sd-dir-card img[width="60"] {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
}

.sd-dir .sd-dir-card h2 {
  font-size: 1.125rem !important;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sd-text);
  transition: color .2s ease;
}

.sd-dir .sd-dir-card:hover h2 {
  color: var(--sd-green-text);
}

.sd-dir .sd-dir-card .text-muted {
  font-size: 0.875rem;
}

.sd-dir .sd-dir-card .lp-text-gray-700 {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--sd-body) !important;
}

/* "Show more" under the profiles (shown by directory_filters.js when no filter is chosen) */
.sd-dir .sd-dir-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* Same look as the blog's "More Articles": the secondary button of buttons_redesign.css (outlined in navy,
   filled on hover), with its shared size tokens */
.sd-dir .sd-dir-more {
  font-size: var(--sd-btn-font-size);
  font-weight: var(--sd-btn-font-weight);
  line-height: var(--sd-btn-line-height);
  padding: var(--sd-btn-padding-y) var(--sd-btn-padding-x);
  border: var(--sd-btn-border-width) solid var(--sd-btn-secondary-color);
  border-radius: var(--sd-btn-radius);
  background-color: transparent;
  color: var(--sd-btn-secondary-color);
  transition: var(--sd-btn-transition);
}

.sd-dir .sd-dir-more[hidden] {
  display: none;
}

.sd-dir .sd-dir-more:is(:hover, :focus-visible, :active) {
  background-color: var(--sd-btn-secondary-color);
  color: var(--sd-btn-secondary-color-hover);
}

.sd-dir .sd-dir-more:focus-visible {
  outline: 0;
  box-shadow: var(--sd-btn-focus-ring);
}
.sd-dir .sd-dir-list .row > [hidden] {
  display: none;
}
/* The cards come in while scrolling (scroll reveal of site_redesign.js) */

/* ------------------------------------------------------------------ Small screens */

@media (max-width: 767.98px) {
  .sd-dir .sd-dir-hero {
    padding: 2.75rem 0 3rem !important;
  }

  .sd-dir .sd-dir-hero--profile {
    padding-bottom: 2.5rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sd-dir .sd-dir-card,
  .sd-dir .sd-dir-card::before,
  .sd-dir .sd-dir-filter .btn,
  .sd-dir .sd-dir-filter .form-label i,
  .sd-dir .sd-dir-chip,
  .sd-dd-toggle,
  .sd-dd-toggle::after,
  .sd-dd-panel {
    transition: none !important;
  }
}
