// Dashboard "Post Schedule" widget. Tooltip, mini calendar and time picker
// styles come from css/style.scss (the dashboard renders inside .wrap).
#gelform_postcal_schedule {
  #calendar-form {
    position: relative;
    margin: 0;
  }

  .gelform-postcal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 8px 0;
    font-size: 12px;

    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: #50575e;
      text-decoration: none;

      &:hover {
        color: #2271b1;
      }
    }

    .legend-color {
      width: 12px;
      height: 12px;
      border-radius: 2px;
      display: inline-block;
    }
  }

  .gelform-postcal-agenda {
    max-height: 420px;
    overflow-y: auto;
    border-top: 1px solid #dcdcde;
  }

  .agenda-month {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    padding: 10px 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
  }

  .agenda-day {
    display: flex;
    gap: 8px;
    padding: 6px 0;

    &.is-past .agenda-date {
      color: #8c8f94;
    }
  }

  .agenda-date {
    flex: 0 0 44px;
    text-align: center;
    color: #50575e;
    line-height: 1.2;

    .agenda-weekday {
      display: block;
      font-size: 11px;
      text-transform: uppercase;
    }

    .agenda-daynum {
      display: inline-block;
      min-width: 28px;
      height: 28px;
      line-height: 28px;
      border-radius: 50%;
      font-size: 18px;
    }
  }

  .agenda-day.is-today .agenda-date {
    color: #2271b1;
    font-weight: 600;

    .agenda-daynum {
      background: #2271b1;
      color: #fff;
    }
  }

  .agenda-posts {
    flex: 1;
    min-width: 0;
  }

  .agenda-empty {
    padding: 6px 0;
    color: #8c8f94;
    font-style: italic;
  }

  .post-item {
    margin-bottom: 4px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;

    // Published posts are faded via a pre-tinted background (see template.php),
    // not opacity, so text contrast is computed against what's rendered.
    &.is-published .post-time {
      opacity: 0.8;
    }

    &:hover,
    &:focus {
      filter: brightness(0.95);
    }

    &:focus {
      outline: 2px solid #2271b1;
      outline-offset: 1px;
    }
  }
}
