@layer components {
  .daily-estimation-strip {
    margin-bottom: 1.5rem;
  }

  .daily-estimation-strip__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
  }

  .daily-estimation-strip__list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    gap: 0.5rem;
    padding-bottom: 0.25rem;
  }

  .daily-estimation-strip__day {
    position: relative;
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 64px;
    padding: 0.75rem 0.5rem;
    border-radius: 14px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #fafafa;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  }

  .daily-estimation-strip__day:hover,
  .daily-estimation-strip__day:focus-visible {
    transform: translateY(-2px);
    border-color: var(--secondary-text-color, #94a3b8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .daily-estimation-strip__day--flagged {
    border-style: dashed;
    overflow: hidden;
  }

  .daily-estimation-strip__day--flagged::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      -30deg,
      rgba(167, 167, 167, 0.22) 0px,
      rgba(167, 167, 167, 0.22) 6px,
      transparent 6px,
      transparent 16px
    );
    pointer-events: none;
  }

  [data-theme="dark"] .daily-estimation-strip__day--flagged::before {
    background: repeating-linear-gradient(
      -30deg,
      rgba(232, 180, 141, 0.2) 0px,
      rgba(232, 180, 141, 0.2) 6px,
      transparent 6px,
      transparent 16px
    );
  }

  .daily-estimation-strip__weekday {
    font-size: 0.75rem;
    color: var(--secondary-text-color, #6b7280);
  }

  .daily-estimation-strip__percentage {
    font-family: var(--font-family-mono);
    font-size: 1.1rem;
    font-weight: 600;
  }

  .daily-estimation-strip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
  }

  .daily-estimation-strip__day--low {
    .daily-estimation-strip__percentage { color: #857e70; }
    .daily-estimation-strip__dot { background: #b7afa0; }
  }

  .daily-estimation-strip__day--mid {
    .daily-estimation-strip__percentage { color: #8a6a2e; }
    .daily-estimation-strip__dot { background: #cb9a3d; }
  }

  .daily-estimation-strip__day--good {
    background: #eef1e3;
    .daily-estimation-strip__percentage { color: #5f7233; }
    .daily-estimation-strip__dot { background: #86a54a; }
  }

  .daily-estimation-strip__day--prime {
    background: #e4efe4;
    .daily-estimation-strip__percentage { color: #2f6b45; }
    .daily-estimation-strip__dot { background: #3f9d6b; }
  }

  [data-theme="dark"] .daily-estimation-strip__day {
    background: #1e293b;
    border-color: #334155;
  }

  [data-theme="dark"] .daily-estimation-strip__day:hover,
  [data-theme="dark"] .daily-estimation-strip__day:focus-visible {
    border-color: #64748b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  }

  [data-theme="dark"] .daily-estimation-strip__weekday {
    color: #94a3b8;
  }

  [data-theme="dark"] .daily-estimation-strip__day--good {
    background: #26331f;
  }

  [data-theme="dark"] .daily-estimation-strip__day--prime {
    background: #1c3327;
  }

  /* Estimation feedback modal */

  .estimation-feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
  }

  /* `.hidden` lives in @layer legacy, which this app's declared layer order
     ranks below @layer components - so it needs the extra class here to win. */
  .estimation-feedback-modal.hidden {
    display: none;
  }

  .estimation-feedback-modal__panel {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  .estimation-feedback-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .estimation-feedback-modal__sport {
    margin: 0 0 0.15rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--secondary-text-color, #6b7280);
  }

  .estimation-feedback-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
  }

  .estimation-feedback-modal__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--secondary-text-color, #6b7280);

    svg {
      width: 12px;
      height: 12px;
    }
  }

  [data-theme="dark"] .estimation-feedback-modal__panel {
    background: #1e293b;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
  }

  /* Issue tag picker */

  .estimation-issue-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .estimation-issue-picker__option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;

    &:has(.estimation-issue-picker__input:checked) {
      background: #eff6ff;
      border-color: #3b82f6;
    }

    &:hover {
      border-color: #93c5fd;
    }
  }

  .estimation-issue-picker__label {
    font-size: var(--font-size-sm, 0.875rem);
  }

  .estimation-feedback-modal__delete {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
  }
}
