/* Front-end styles for G-Ranking */

.g-ranking-lookup{ max-width: 980px; margin: 0 auto; }

.g-ranking-form{ display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; padding:14px; border:1px solid #e5e7eb; border-radius:12px; background:#fff; }
.g-ranking-form .gr-row{ display:flex; flex-direction:column; gap:6px; min-width: 180px; }
.g-ranking-form label{ font-weight:600; color:#111827; }
.g-ranking-form input, .g-ranking-form select{ padding:10px 12px; border:1px solid #d1d5db; border-radius:10px; background:#fff; color:#111827; }
.g-ranking-form button[type="submit"]{ padding:10px 14px; border-radius:10px; border:1px solid #111827; background:#111827; color:#fff; font-weight:700; cursor:pointer; }

/* Quick search UI */
.g-ranking-quick-form{ display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; padding:14px; border:1px dashed #e5e7eb; border-radius:12px; background:#fff; margin-bottom:12px; }
.g-ranking-quick-form .gr-row{ display:flex; flex-direction:column; gap:6px; min-width: 260px; }
.g-ranking-quick-form label{ font-weight:700; color:#111827; }
.g-ranking-quick-form input{ padding:10px 12px; border:1px solid #d1d5db; border-radius:10px; background:#fff; color:#111827; }
.g-ranking-quick-form button[type="submit"]{ padding:10px 14px; border-radius:10px; border:1px solid #111827; background:#fff; color:#111827; font-weight:800; cursor:pointer; }

.gr-quick-search-results{ margin: 0 0 12px; padding: 12px; border:1px solid #e5e7eb; border-radius:12px; background:#fff; }
.gr-quick-title{ font-weight:800; color:#111827; margin-bottom:8px; }
.gr-quick-list{ margin:0; padding-left:18px; }
.gr-quick-list li{ margin:6px 0; }
.gr-quick-list a{ text-decoration:underline; }

.gr-head{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin:16px 0 8px; padding:10px 12px; border-radius:12px; border:1px solid #e5e7eb; background:#f3f4f6; }
.gr-head-title{ font-size:18px; font-weight:800; color:#111827; }

/* Ensure Print button text is visible even if theme overrides button colors */
.gr-print{ padding:8px 12px; border-radius:10px; border:1px solid #111827; background:#fff; color:#111827; font-weight:700; cursor:pointer; }
.gr-print:hover{ opacity:0.9; }

.g-ranking-table{ width:100%; border-collapse:collapse; background:#fff; border:1px solid #e5e7eb; border-radius:12px; overflow:hidden; }
.g-ranking-table th, .g-ranking-table td{ padding:10px 12px; border-bottom:1px solid #e5e7eb; }
.g-ranking-table thead th{ text-align:left; font-weight:800; color:#111827; background:#f9fafb; }
.g-ranking-table tbody td{ color:#111827; }

.g-ranking-table tr.gr-top{ background:#e9fbe9; }
.g-ranking-table tr.gr-bottom{ background:#fdecec; }

.gr-message{ margin-top:12px; padding:10px 12px; border-radius:12px; border:1px solid #e5e7eb; background:#fff; }
.gr-message.gr-up{ border-color:#86efac; }
.gr-message.gr-down{ border-color:#fca5a5; }
.gr-message.gr-hold{ border-color:#93c5fd; }


/* UI overrides to prevent theme styles from forcing yellow text / hidden calendar icon */
.g-ranking-form select,
.g-ranking-form select:focus,
.g-ranking-form select:active{
  color:#000 !important;
  background:#fff !important;
}
.g-ranking-form select option{
  color:#000 !important;
  background:#fff !important;
}

/* Date input: keep text readable and make calendar icon visible */
.g-ranking-form input[type="date"]{
  color:#000 !important;
  background:#fff !important;
}
.g-ranking-form input[type="date"]::-webkit-calendar-picker-indicator{
  opacity:1 !important;
  filter:none !important;
}
.g-ranking-form input[type="date"]::-webkit-datetime-edit,
.g-ranking-form input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.g-ranking-form input[type="date"]::-webkit-datetime-edit-text,
.g-ranking-form input[type="date"]::-webkit-datetime-edit-month-field,
.g-ranking-form input[type="date"]::-webkit-datetime-edit-day-field,
.g-ranking-form input[type="date"]::-webkit-datetime-edit-year-field{
  color:#000 !important;
}


@media print {
  .g-ranking-form{ display:none !important; }
  .g-ranking-quick-form{ display:none !important; }
  .gr-print{ display:none !important; }
  .g-ranking-lookup{ max-width: none; }
  .gr-head{ border:none; background:transparent; padding:0; }
}



/* === UI FIX: Division dropdown text visibility === */
#gcr-division,
#gcr-division option,
select[name="division"] {
    color: #000000 !important;
    background-color: #ffffff !important;
}

#gcr-division:-webkit-autofill {
    -webkit-text-fill-color: #000000 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* === UI FIX: Date calendar icon visibility === */
#gcr-date {
    color: #000000 !important;
    background-color: #ffffff !important;
    padding-right: 40px;
}

#gcr-date::-webkit-calendar-picker-indicator {
    opacity: 1 !important;
    display: block !important;
    cursor: pointer;
    filter: invert(0);
}

#gcr-date {
    appearance: auto;
}


/* FIX 62: Quick search result dates - always visible, black, no hover-only behavior */
.gr-quick-search-results {
  background-color: #f2f2f2;
  border-radius: 6px;
  padding: 12px 14px;
}

.gr-quick-search-results .gr-quick-list a,
.gr-quick-search-results .gr-quick-list a:visited,
.gr-quick-search-results .gr-quick-list a:hover,
.gr-quick-search-results .gr-quick-list a:focus {
  color: #000000 !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-decoration: underline;
  font-weight: 600;
}


/* =====================================================
   Goldusters Luxury Theme UI Refresh for G-Ranking
   Design-only update: no functionality changes
===================================================== */
.g-ranking-lookup{
  max-width: 1120px;
  margin: 36px auto;
  padding: 28px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(251,176,64,.16), transparent 28%),
    linear-gradient(145deg, #04142d 0%, #031026 52%, #020916 100%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 70px rgba(0,0,0,.45);
  color: #fff;
}

.g-ranking-form,
.g-ranking-quick-form,
.gr-quick-search-results,
.gr-head,
.gr-message{
  background: rgba(7, 23, 51, .76) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 18px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.g-ranking-form label,
.g-ranking-quick-form label,
.gr-head-title,
.gr-quick-title{
  color: #ffffff !important;
}

.g-ranking-form input,
.g-ranking-form select,
.g-ranking-quick-form input,
.g-ranking-quick-form select{
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
}

.g-ranking-form input::placeholder,
.g-ranking-quick-form input::placeholder{
  color: rgba(255,255,255,.68) !important;
}

/* keep dropdown/date values readable */
.g-ranking-form select option,
.g-ranking-quick-form select option{
  color: #000 !important;
  background: #fff !important;
}

.g-ranking-form button[type="submit"],
.g-ranking-quick-form button[type="submit"],
.gr-print{
  background: linear-gradient(180deg, #f6c65c 0%, #FBB040 100%) !important;
  color: #111827 !important;
  border: 1px solid rgba(251,176,64,.65) !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 18px rgba(251,176,64,.18);
}

.g-ranking-form button[type="submit"]:hover,
.g-ranking-quick-form button[type="submit"]:hover,
.gr-print:hover{
  opacity: .96;
  transform: translateY(-1px);
}

.gr-head{
  padding: 14px 16px !important;
  margin: 18px 0 12px !important;
}

.gr-head-title{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .2px;
}

.g-ranking-table{
  background: rgba(6, 20, 45, .92) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
}

.g-ranking-table thead th{
  background: linear-gradient(180deg, #f6c65c 0%, #FBB040 100%) !important;
  color: #111827 !important;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .3px;
  border-bottom: 1px solid rgba(0,0,0,.12);
}

.g-ranking-table tbody td{
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255,255,255,.06) !important;
}

.g-ranking-table tbody tr{
  background: transparent;
  transition: background-color .18s ease, transform .18s ease;
}

.g-ranking-table tbody tr:hover{
  background: rgba(255,255,255,.04);
}

/* Top 3 = premium gold styling */
.g-ranking-table tr.gr-top{
  background: linear-gradient(90deg, rgba(251,176,64,.20), rgba(251,176,64,.08)) !important;
}
.g-ranking-table tr.gr-top td{
  color: #fff6df !important;
  font-weight: 700;
}
.g-ranking-table tr.gr-top td:first-child{
  color: #FBB040 !important;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(251,176,64,.18);
}

/* Bottom 3 stays red */
.g-ranking-table tr.gr-bottom{
  background: linear-gradient(90deg, rgba(220,38,38,.35), rgba(185,28,28,.20)) !important;
  box-shadow: inset 0 0 18px rgba(255,80,80,.45);
}
.g-ranking-table tr.gr-bottom td:first-child{
  color: #ff8f8f !important;
  font-weight: 900;
}

/* Highlight searched player row */
.g-ranking-table tr.gr-me{
  outline: 2px solid rgba(251,176,64,.55);
  outline-offset: -2px;
  box-shadow: inset 0 0 0 9999px rgba(251,176,64,.08);
}

.gr-message{
  color: #ffffff;
}
.gr-message.gr-up{
  border-color: rgba(251,176,64,.55) !important;
  background: linear-gradient(90deg, rgba(251,176,64,.18), rgba(251,176,64,.06)) !important;
}
.gr-message.gr-down{
  border-color: rgba(248,113,113,.42) !important;
  background: linear-gradient(90deg, rgba(153,27,27,.18), rgba(153,27,27,.06)) !important;
}
.gr-message.gr-hold,
.gr-message.gr-keep{
  border-color: rgba(148,163,184,.35) !important;
  background: rgba(255,255,255,.04) !important;
}

.gr-quick-search-results .gr-quick-list a,
.gr-quick-search-results .gr-quick-list a:visited,
.gr-quick-search-results .gr-quick-list a:hover,
.gr-quick-search-results .gr-quick-list a:focus{
  color: #FBB040 !important;
}

@media (max-width: 768px){
  .g-ranking-lookup{
    padding: 18px;
    border-radius: 20px;
  }
  .gr-head{
    flex-direction: column;
    align-items: stretch;
  }
  .gr-head-title{
    font-size: 18px;
  }
}


/* v1.6.10 winners / champs */
.gr-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:12px;align-items:start}
.gr-main{min-width:0}
.gr-seed-banner{margin:0 0 10px;padding:12px 14px}
.gr-seed-name{color:#d28b00;font-weight:800}
.gr-trophies{white-space:nowrap;margin-left:6px}
.gr-seed-history{padding:12px}
.gr-side-title{font-weight:800;margin-bottom:10px}
.gr-history-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.gr-history-list li{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border:1px solid rgba(212,175,55,.18);border-radius:12px;background:rgba(255,255,255,.03)}
.gr-history-name{font-weight:700}
.gr-history-trophy{margin-left:8px;white-space:nowrap}
.gr-history-empty{opacity:.8}
.gr-champs-wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.gr-champ-card{border:1px solid rgba(212,175,55,.30);border-radius:18px;background:radial-gradient(circle at top left, rgba(212,175,55,.07), transparent 28%),linear-gradient(135deg,#04070d 0%,#0a0f18 58%,#191106 100%);box-shadow:0 10px 24px rgba(0,0,0,.18);color:#f7f3e8;padding:16px}
.gr-champ-division{color:#f4e2a0;font-weight:800;margin-bottom:6px}
.gr-champ-name{font-size:18px;font-weight:800}
.gr-champ-date{opacity:.85;margin-top:6px}
@media (max-width: 800px){.gr-layout{grid-template-columns:1fr}}

/* Most recent champs shortcode - luxury compact card style only */
.gr-most-recent-champs{
  width: min(1200px, 100%);
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 14px;
  border: 1px solid rgba(212,175,55,.38);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(212,175,55,.10), transparent 28%),
    linear-gradient(135deg,#04070d 0%,#0a0f18 58%,#191106 100%);
  box-shadow: 0 18px 34px rgba(0,0,0,.24);
  color: #f7f3e8;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.gr-most-recent-champs::before{
  content: "";
  display: block;
  height: 1px;
  margin: 0 0 12px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,.5), transparent);
}

.gr-most-recent-champs .gr-mrc-header{
  grid-column: 1 / -1;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:2px;
}

.gr-most-recent-champs .gr-mrc-title{
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
  color: #f7f3e8;
  margin: 0;
}

.gr-most-recent-champs .gr-mrc-toggle{
  min-width: 92px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid #caa12f;
  background: linear-gradient(180deg,#f4d56b,#d4af37);
  color: #111827 !important;
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.3);
}

.gr-most-recent-champs-item{
  padding: 14px 14px 12px;
  border: 1px solid rgba(212,175,55,.28);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(20,10,0,.32));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.gr-most-recent-champs-item::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.06) 46%, rgba(255,255,255,.16) 50%, rgba(255,255,255,.06) 54%, transparent 80%);
  transform: translateX(-140%);
  opacity: 0;
  pointer-events: none;
}

.gr-most-recent-champs-item:hover{
  transform: translateY(-3px);
  border-color: rgba(212,175,55,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 0 0 1px rgba(212,175,55,.14), 0 14px 28px rgba(0,0,0,.28), 0 0 22px rgba(212,175,55,.14);
}

.gr-most-recent-champs-item:hover::after{
  opacity: 1;
  animation: grMrcCardSweep .95s ease;
}

.gr-most-recent-champs-division{
  color: #f1c94e;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

.gr-most-recent-champs-date{
  color: rgba(247,243,232,.8);
  font-size: 12px;
  margin: -2px 0 8px;
}

.gr-most-recent-champs-name{
  display:flex;
  align-items:center;
  gap: 10px;
  color: #f7f3e8;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

.gr-most-recent-champs-name::before{
  content: "";
  display: none;
}

.gr-most-recent-champs.gr-mrc-light{
  background: linear-gradient(180deg,#fffdf7 0%, #f7f0dc 100%);
  color: #1f2937;
  box-shadow: 0 12px 24px rgba(0,0,0,.10);
}

.gr-most-recent-champs.gr-mrc-light .gr-mrc-title{
  color: #1f2937;
}

.gr-most-recent-champs.gr-mrc-light .gr-most-recent-champs-item{
  background: rgba(255,255,255,.72);
  border-color: rgba(212,175,55,.24);
}

.gr-most-recent-champs.gr-mrc-light .gr-most-recent-champs-division{
  color: #9a6b00;
}

.gr-most-recent-champs.gr-mrc-light .gr-most-recent-champs-date{
  color: rgba(31,41,55,.72);
}

.gr-most-recent-champs.gr-mrc-light .gr-most-recent-champs-name{
  color: #1f2937;
}

@media (max-width: 980px){
  .gr-most-recent-champs{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px){
  .gr-most-recent-champs{
    width: 94%;
    max-width: 94%;
    grid-template-columns: 1fr;
    padding: 12px;
    border-radius: 22px;
  }
  .gr-most-recent-champs .gr-mrc-title{
    font-size: 17px;
  }
  .gr-most-recent-champs .gr-mrc-toggle{
    min-width: 84px;
    min-height: 44px;
    font-size: 15px;
  }
  .gr-most-recent-champs-name{
    font-size: 20px;
  }
  .gr-most-recent-champs-name::before{
    font-size: 24px;
  }
}


.gr-most-recent-champs-trophies{
  margin-top: auto;
  padding-top: 8px;
  color: #f1c94e;
  font-size: 20px;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.gr-most-recent-champs-trophies::after{
  content: "";
  position: absolute;
  top: -15%;
  left: -40%;
  width: 32%;
  height: 130%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.48), rgba(255,255,255,0));
  transform: skewX(-22deg);
  opacity: 0;
  pointer-events: none;
}

.gr-most-recent-champs-item:hover .gr-most-recent-champs-trophies::after{
  opacity: 1;
  animation: grMrcTrophyShine .9s ease forwards;
}

.gr-most-recent-champs.gr-mrc-light .gr-most-recent-champs-trophies{
  color: #9a6b00;
}