/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/*
 Unset the position: relative that is set by datpickers own css file
 */
[data-controller="datepicker"] {
  position: unset;
}

.sdp-cal {
  font-size: var(--text-sm);

  .sdp-days-of-week div {
    color: currentColor;
  }

  .sdp-month,
  .sdp-year {
    border-radius: var(--radius-sm);
  }

  @media (prefers-color-scheme: dark) {
    --sdp-background: var(--color-gray-700);
    --sdp-border: var(--color-gray-500);

    .sdp-month,
    .sdp-year {
      background-color: var(--color-gray-500);
    }
  }
}


.simple-calendar {
  cursor: default;

  .today span {
    border-width: 2px;
    border-color: var(--color-gray-500);
    border-radius: calc(infinity * 1px);

    @media (prefers-color-scheme: dark) {
      border-color: var(--color-gray-200);
    }
  }

  .prev-month,
  .next-month {
    background-color: var(--color-gray-200);
    color: var(--color-gray-400);
  }

  @media (prefers-color-scheme: dark) {

    .prev-month,
    .next-month {
      background-color: var(--color-gray-700);
      color: var(--color-gray-300);
    }
  }

  :nth-child(1 of .prev-month),
  :nth-child(1 of .next-month) {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
  }

  :nth-last-child(1 of .prev-month),
  :nth-last-child(1 of .next-month) {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
  }

  .current-month.day {
    border-radius: var(--radius-md);
  }

  .current-month.day:hover {
    background-color: var(--color-gray-100);
  }

  @media (prefers-color-scheme: dark) {
    .current-month.day:hover {
      background-color: var(--color-gray-500);
    }
  }

}