/* ========================================================================== */
/* [08] FAVORITES / SEARCH / FILTERS                                          */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* FAVORITES BUTTON                                                            */
/* NOTE: size/placement may be adjusted in layout files; visual style lives here */
/* -------------------------------------------------------------------------- */
.fav-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  min-width:30px;
  border-radius:50%;
  font-size:17px;
  line-height:1;
  cursor:pointer;
  user-select:none;
  background:linear-gradient(180deg,#063c41,#03292d);
  border:1px solid rgba(0,255,255,.35);
  color:#9fefff;
  box-shadow:
    inset 0 0 6px rgba(0,255,255,.18),
    0 2px 6px rgba(0,0,0,.45);
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease,
    color .15s ease,
    filter .15s ease;
}

.fav-btn:hover{
  transform:translateY(-1px) scale(1.05);
  box-shadow:
    inset 0 0 10px rgba(0,255,255,.35),
    0 6px 14px rgba(0,0,0,.6);
}

.fav-btn.is-active{
  background:linear-gradient(180deg,#6b4a00,#3e2a00);
  border-color:#ffd24d;
  color:#ffd24d;
  box-shadow:
    inset 0 0 8px rgba(255,210,77,.35),
    0 0 10px rgba(255,210,77,.35);
}

.fav-btn:focus,
.fav-btn:focus-visible{
  outline:none;
  box-shadow:
    0 0 0 2px rgba(0,255,255,.45),
    inset 0 0 8px rgba(0,255,255,.35);
}

/* -------------------------------------------------------------------------- */
/* FAVORITES LISTS                                                             */
/* -------------------------------------------------------------------------- */
.fav-list{
  display:grid;
  gap:10px;
  min-width:0;
}

#fav-main-list,
#fav-tab-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:12px;
  width:100%;
  margin:12px 0;
  padding:0;
  list-style:none;
  min-width:0;
}

.fav-card{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
  padding:10px 12px;
  background:linear-gradient(180deg,#05393e,#04282c);
  border-radius:12px;
  border:1px solid rgba(0,255,255,.28);
  color:#cceeff;
  font-family:HeliosCond, sans-serif;
  box-shadow:
    inset 0 0 14px rgba(0,255,255,.15),
    0 8px 20px rgba(0,0,0,.55);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.fav-card:hover{
  transform:translateY(-3px);
  background:linear-gradient(180deg,#06464b,#05353a);
  box-shadow:
    inset 0 0 18px rgba(0,255,255,.22),
    0 14px 30px rgba(0,0,0,.7);
}

.fav-card .fav-link{
  flex:1 1 auto;
  min-width:0;
  font-size:.95rem;
  font-weight:700;
  color:#bffcff;
  text-decoration:none;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.fav-card .fav-link:hover{
  color:#00ffff;
  text-decoration:underline;
}

.fav-card .fav-remove{
  flex:0 0 auto;
  width:26px;
  height:26px;
  min-width:26px;
  border-radius:50%;
  border:none;
  cursor:pointer;
  background:radial-gradient(circle at 30% 30%, #ff7a7a, #7a1212);
  color:#fff;
  font-size:14px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:
    0 3px 8px rgba(0,0,0,.55),
    inset 0 0 4px rgba(255,255,255,.3);
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    filter .15s ease;
}

.fav-card .fav-remove:hover{
  transform:scale(1.15);
  filter:brightness(1.15);
  box-shadow:
    0 6px 14px rgba(0,0,0,.75),
    inset 0 0 6px rgba(255,255,255,.45);
}

#fav-main-list > div,
#fav-tab-list > div{
  grid-column:1 / -1;
  text-align:center;
  color:#8fbfc8;
  font-size:.9rem;
  opacity:.75;
  padding:10px 0;
}

/* -------------------------------------------------------------------------- */
/* SEARCH / USER GRID                                                          */
/* -------------------------------------------------------------------------- */
.search-block-wrapper{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:100%;
  margin-top:20px;
  text-align:center;
  min-width:0;
}

.welcome-message{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  max-width:900px;
  margin:clamp(24px, 7vh, 96px) auto 15px;
  padding:0 12px;
  font-size:1.1rem;
  color:#ffffff;
  line-height:1.4;
  text-align:center;
  overflow-wrap:anywhere;
}

.search-form{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  width:100%;
  max-width:650px;
  margin:18px auto;
  padding:0 12px;
}

.search-form > *{
  min-width:0;
}

.search-form input[type="text"],
.search-form input[type="search"]{
  flex:1 1 260px;
  min-width:0;
}

.search-form .btn,
.search-form button,
.search-form input[type="submit"]{
  flex:0 0 auto;
}

.user-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(150px,1fr));
  gap:10px;
  width:100%;
  max-width:700px;
  margin:20px auto;
  padding:10px;
  background:rgba(0,30,33,.75);
  border-radius:10px;
  box-shadow:0 0 8px #00ffff22;
  min-width:0;
}

.user-item{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  min-width:0;
  padding:8px 12px;

  border-radius:6px;
  color:#00ffff;
  text-align:center;
  text-decoration:none;
  font-weight:700;
  transition:all .2s ease;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.user-item:hover{
  background:#005f6f;
  color:#ffffff;
  box-shadow:0 0 6px #00ffff66;
}

/* -------------------------------------------------------------------------- */
/* FILTERS                                                                     */
/* -------------------------------------------------------------------------- */
.filter-container{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:8px 12px;
  background:rgba(0,30,33,.85);
  border:1px solid #00ffff22;
  border-radius:6px;
  box-sizing:border-box;
  width:100%;
  min-width:0;
}

.filter-container .filter-label{
  color:#00ffff;
  font-weight:700;
  font-size:.9rem;
  white-space:nowrap;
  margin-right:6px;
}

.filter-container .filter-select{
  flex:1 1 180px;
  min-width:0;
  padding:6px 10px;
  border-radius:4px;
  border:1px solid #00ffff22;
  background:#002c30;
  color:#cceeff;
  font-size:.9rem;
}

/* -------------------------------------------------------------------------- */
/* RATING MARKERS                                                              */
/* -------------------------------------------------------------------------- */
.match-card.win .rating::after{
  content:"+";
  color:#00ff99;
  font-weight:900;
}

.match-card.loss .rating::after{
  content:"−";
  color:#ff6b6b;
  font-weight:900;
}

/* -------------------------------------------------------------------------- */
/* RESPONSIVE                                                                  */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px){
  #fav-main-list,
  #fav-tab-list{
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:10px;
  }

  .fav-card{
    padding:10px;
    gap:8px;
  }

  .welcome-message{
    margin:24px auto 12px;
    font-size:1rem;
  }

  .search-form{
    gap:8px;
    margin:14px auto;
    padding:0 10px;
  }

  .search-form input[type="text"],
  .search-form input[type="search"],
  .search-form .btn,
  .search-form button,
  .search-form input[type="submit"]{
    width:100%;
    flex:1 1 100%;
  }

  .user-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:8px;
    padding:8px;
  }

  .filter-container{
    padding:8px 10px;
  }

  .filter-container .filter-label,
  .filter-container .filter-select{
    width:100%;
    flex:1 1 100%;
  }
}

@media (max-width: 480px){
  #fav-main-list,
  #fav-tab-list,
  .user-grid{
    grid-template-columns:1fr;
  }

  .fav-card .fav-link,
  .user-item{
    font-size:.92rem;
  }
}
