/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --app-navbar-height: 4.25rem;
}

body {
  background: #f7f9fc;
}

body.has-fixed-navbar {
  padding-top: var(--app-navbar-height);
}

.app-navbar {
  min-height: var(--app-navbar-height);
}

.app-navbar .navbar-item {
  min-height: var(--app-navbar-height);
}

.app-gear-link {
  font-size: 1.6rem;
  line-height: 1;
}

.card-header-title {
  white-space: normal;
}

.navbar-item form {
  margin: 0;
}

.odds-page-container {
  width: 100%;
  max-width: calc(100vw - 40px);
  margin: 0 auto;
}

.form-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  margin-right: 0.3rem;
}

.form-pill-win {
  background: #d6f5e3;
  color: #0f7a3f;
}

.form-pill-draw {
  background: #eceff3;
  color: #596574;
}

.form-pill-loss {
  background: #ffe1e1;
  color: #b02020;
}

.valuebet-page .box {
  border: 1px solid #e6ebf2;
}

.valuebet-day-group {
  background: #eef3fb;
  color: #22364b;
}

.valuebet-hero {
  background: linear-gradient(135deg, #f4f8ff 0%, #eef6ff 100%);
}

.valuebet-filter-form {
  margin-bottom: 1rem;
}

.valuebet-filter-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 1rem;
  align-items: start;
}

.valuebet-filter-group {
  border: 1px solid #e4ebf5;
  border-radius: 0.7rem;
  padding: 0.75rem 0.9rem;
  background: #fbfdff;
}

.valuebet-filter-group-recommendations {
  border-right: 3px solid #d8e6f7;
}

.valuebet-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.45rem;
}

.valuebet-checkbox-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #f4f8fe;
  border: 1px solid #dbe6f4;
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  min-height: 2rem;
}

.valuebet-checkbox-chip input[type="checkbox"] {
  margin: 0;
}

.valuebet-league-grid {
  grid-auto-flow: column;
  grid-template-rows: repeat(3, minmax(0, auto));
  grid-auto-columns: minmax(max-content, 1fr);
  align-items: start;
}

.valuebet-league-grid .valuebet-checkbox-chip {
  min-width: max-content;
}

.valuebet-league-grid .valuebet-checkbox-chip span {
  white-space: nowrap;
}

.valuebet-badge {
  font-weight: 700;
}

.valuebet-badge-neutral {
  background: #eef2f7;
  color: #4c5968;
}

.valuebet-badge-positive {
  background: #d9f5e3;
  color: #0f7a3f;
}

.valuebet-outcome-card {
  height: 100%;
}

.valuebet-form-match-list {
  align-items: flex-start;
  flex-direction: column;
}

.valuebet-form-match-list .tag {
  display: inline-flex;
  height: auto;
  min-height: 1.5rem;
  white-space: normal;
}

.valuebet-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.valuebet-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.45rem;
  background: #f8fafc;
  border: 1px solid #edf1f6;
  border-radius: 0.4rem;
}

.valuebet-vsmart-cell {
  white-space: nowrap;
}

.valuebet-start-cell {
  white-space: nowrap;
}

.valuebet-vsmart-list {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
}

.valuebet-chart-placeholder {
  min-height: 180px;
  border: 2px dashed #cdd9e6;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6d7f92;
  background: #fbfdff;
}

.valuebet-checklist {
  margin: 0;
  padding-left: 1.1rem;
}

.valuebet-direction-down {
  background: #d9f5e3;
  color: #0f7a3f;
}

.valuebet-direction-up {
  background: #ffe3e3;
  color: #b02020;
}

.valuebet-direction-neutral {
  background: #eef2f7;
  color: #4c5968;
}

.metric-good {
  background: #d9f5e3;
  color: #0f7a3f;
  border: 1px solid #b9eaca;
}

.metric-warn {
  background: #fff3d9;
  color: #8a5a00;
  border: 1px solid #f0dfb0;
}

.metric-bad {
  background: #ffe3e3;
  color: #b02020;
  border: 1px solid #f3c9c9;
}

.metric-neutral {
  background: #eef2f7;
  color: #4c5968;
  border: 1px solid #d9e1ea;
}

.metric-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  background: #e7eef8;
  color: #2e547e;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: help;
  position: relative;
  border: 1px solid #c8d8ea;
  outline: none;
}

.metric-help::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.55rem);
  transform: translateX(0) translateY(0.2rem);
  width: min(320px, calc(100vw - 2rem));
  padding: 0.5rem 0.6rem;
  border-radius: 0.45rem;
  background: #1f2b3a;
  color: #f3f7fd;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(22, 35, 51, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 20;
  white-space: normal;
}

.metric-help::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  bottom: calc(100% + 0.2rem);
  transform: rotate(45deg) translateY(0.15rem);
  width: 0.5rem;
  height: 0.5rem;
  background: #1f2b3a;
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 19;
}

.metric-help:hover::after,
.metric-help:focus::after,
.metric-help:hover::before,
.metric-help:focus::before {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

.metric-help:hover::before,
.metric-help:focus::before {
  transform: rotate(45deg) translateY(0);
}

.metric-help:focus {
  box-shadow: 0 0 0 2px #bfd6f1;
}

@media (max-width: 768px) {
  .metric-help::after {
    left: 0;
    right: auto;
    transform: translateX(0) translateY(0.2rem);
    width: min(270px, calc(100vw - 2rem));
  }

  .metric-help::before {
    left: 0.45rem;
    right: auto;
    transform: rotate(45deg) translateY(0.15rem);
  }

  .metric-help:hover::after,
  .metric-help:focus::after {
    transform: translateX(0) translateY(0);
  }

  .metric-help:hover::before,
  .metric-help:focus::before {
    transform: rotate(45deg) translateY(0);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }

  body {
    background: #0f141b;
    color: #dce6f2;
  }

  .section {
    background: transparent;
  }

  .app-navbar.navbar {
    background: #121922;
    border-bottom: 1px solid #243244;
  }

  .app-navbar .navbar-item,
  .app-navbar .navbar-link {
    color: #dce6f2;
  }

  .app-navbar .navbar-dropdown {
    background: #162130;
    border-color: #2a3c52;
  }

  .app-navbar .navbar-divider {
    background: #2a3c52;
  }

  .box,
  .card,
  .table-container {
    background: #151e29;
    color: #dce6f2;
    border-color: #2a3c52;
  }

  .title,
  .subtitle,
  .label,
  .content,
  strong {
    color: #e8f0fa;
  }

  .input,
  .select select,
  .textarea {
    background: #0f1722;
    border-color: #2a3c52;
    color: #dce6f2;
  }

  .table {
    background: #151e29;
    color: #dce6f2;
  }

  .table thead th {
    color: #b8c8db;
    border-color: #2a3c52;
    background: #172231;
  }

  .table td {
    border-color: #243244;
  }

  .table.is-striped tbody tr:not(.is-selected):nth-child(even) {
    background: #132030;
  }

  .table.is-hoverable tbody tr:not(.is-selected):hover {
    background: #1a283a;
  }

  .table tr.is-selected {
    background: #1d2f45;
  }

  .valuebet-page .box {
    border-color: #2a3c52;
  }

  .valuebet-day-group {
    background: #223247;
    color: #dce6f2;
    border-color: #32475f;
  }

  .valuebet-hero {
    background: linear-gradient(135deg, #152131 0%, #1a2b3f 100%);
  }

  .valuebet-filter-group {
    background: #152130;
    border-color: #2a3c52;
  }

  .valuebet-filter-group-recommendations {
    border-right-color: #365272;
  }

  .valuebet-checkbox-chip {
    background: #162435;
    border-color: #2f4a69;
    color: #dce6f2;
  }

  .valuebet-metric-row {
    background: #111a26;
    border-color: #26384c;
  }

  .tag.is-light {
    background: #223247;
    color: #dce6f2;
  }

  .metric-neutral {
    background: #223247;
    color: #bfcde0;
    border-color: #32475f;
  }

  .metric-help {
    background: #26384e;
    color: #dce6f2;
    border-color: #3a5472;
  }

  .metric-help::after {
    background: #0d1219;
    color: #e8f0fa;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .metric-help::before {
    background: #0d1219;
  }
}

@media (max-width: 1023px) {
  .valuebet-filter-layout {
    grid-template-columns: 1fr;
  }
}
